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

Should forcehtml element attribute on in-line elements propagate to child elements? #13

Open
EvitanRelta opened this issue Dec 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@EvitanRelta
Copy link
Owner

Currently, the below input HTML, where a text-formatting element (ie. <b>) has the forcehtml attribute:

<p><b forcehtml><s>TEXT</s></b></p>

gives this markdown output:

<b>~~TEXT~~</b>

where the forcehtml doesn't propagate to the inner <s> element.


The question is, should it propagate or not?
Because the above markdown output renders fine in GitHub (with bold and strikethrough applied).

It seems that markdown syntax still works inside of HTML-syntax, as long as the outer element is an in-line-element like <span>, <b> and <s>, like:

<span><b>~~TEXT~~</b><span>

which properly renders as:

TEXT


But if the outer element is a block-element (eg. <p>) like below:

<p><b>~~TEXT~~</b></p>

It fails to render the inner markdown-syntax, like so:

~~TEXT~~

@EvitanRelta EvitanRelta added the bug Something isn't working label Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant