This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
Generating tree structures for HTML with a comment inside a heading or paragraph fails. #2178
Labels
bug
component: parse tree
innovation
Innovative issue. Relating to performance, memory or data-flow.
Generating the tree structure fails for HTML that has a comment within a header or paragraph:
The comment gets added to the header as a formatting element, as it should be, but something goes wrong when converting the comment from an
Ignored
node to aFormattingElement
.It currently errors on the calculation of the start- and end position of the formatting elements.
Specifically on this line, where it fails to get the start tag.
YoastSEO.js/src/tree/builder/cleanup/calculateTextIndices.js
Line 116 in 545ce68
More importantly,
parse5
recognizesHow are you?
in the example below as a comment:The text was updated successfully, but these errors were encountered: