Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving the issue on Merged Pull Request #31081

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/HTMLEngineProvider/htmlEngineUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function isChildOfComment(tnode) {
* @returns {Boolean}
*/
function isChildOfH1(tnode) {
return isChildOfNode(tnode, (node) => node.domNode.name.toLowerCase() === 'h1');
return isChildOfNode(tnode, (node) => node.domNode.name === 'H1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking the tag name is not in uppercase, not sure why though. Was there a reason you had to use toLowerCase?

Copy link
Contributor Author

@yakupafsin yakupafsin Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already checked that before it was lowercase somehow. That's why I've just used 'h1' and @roryabraham suggested to use toLowerCase() here: #30876 (comment)

I guess he also checked the default of h1.

}

export {computeEmbeddedMaxWidth, isChildOfComment, isCommentTag, isChildOfH1};
Loading