You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
custom tag and html built-in tag are rendered inconsistently #758
gbp-example is not recognized as a block-level tag, so this is parsed as raw inline HTML. As inline content, it gets put in a paragraph. Of course that's not what you intended, but it's in accord with the spec.
Since this is a custom tag, there's simply no way to know whether it's intended as inline or block level content.
Your best bet is to change the input a bit so that you have a type 7 raw HTML block. For this, the whole tag has to be on a line, followed by end of line.
Perhaps your thought is that we could defer classification of the element until we've finished the paragraph -- if we haven't hit a matching closing tag, we can take it as block-level.
I think that's too fancy, and it goes against our aim of being able to discern block-level content on a line-by-line basis.
Activity
jgm commentedon Dec 13, 2023
gbp-example is not recognized as a block-level tag, so this is parsed as raw inline HTML. As inline content, it gets put in a paragraph. Of course that's not what you intended, but it's in accord with the spec.
Since this is a custom tag, there's simply no way to know whether it's intended as inline or block level content.
Your best bet is to change the input a bit so that you have a type 7 raw HTML block. For this, the whole tag has to be on a line, followed by end of line.
You say:
Perhaps your thought is that we could defer classification of the element until we've finished the paragraph -- if we haven't hit a matching closing tag, we can take it as block-level.
I think that's too fancy, and it goes against our aim of being able to discern block-level content on a line-by-line basis.
mantou132 commentedon Dec 13, 2023
Thank you for your explanation
Refuse a message the HTML parser repairs for the repair alone, before…