-
Notifications
You must be signed in to change notification settings - Fork 5
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
Embedded HTML tags get wrapped in <p> tags #14
Comments
What would be the rule? I don't think this should apply for all top level tags. E.g.
should add paragraph tags around each block including the middle one. So would they only be left out for block level tags? |
Yeah, I think changing the behavior for block-level tags only would make sense. Then somehow disable markdown processing until the corresponding closing tag. Maybe keep a counter of non-commented, non-quoted open (+1) and close (-1) tags of the same tag type and it ends when the counter reaches zero? I think it's fair to assume that the HTML is valid and tags/comments/quotes are balanced. If that's too complicated, I think you could also just count the tags that start at the beginning of the line and make it a user requirement that these are not commented or quoted. |
Looks like the official rules say that block-level tags should be treated differently:
https://daringfireball.net/projects/markdown/syntax#html Based on the description, it sounds like just counting corresponding open and close tags at the beginning of lines would be sufficient. |
The readme says: "You can include arbitrary HTML code in your documents. The HTML will be
passed through to the resulting document without modification."
But when you embed top-level HTML tags like "div", they get wrapped in "p" tags. I think the ideal behavior would as the readme suggests, which is to not add the "p" tags.
The text was updated successfully, but these errors were encountered: