-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Indent is significant within HTML blocks #105
Comments
Very good point @allenap, this has been on my mind, too. I think there are a few things to consider here. This is one of the things I want to clarify and make an explicit spec for as part of #93. I think it's worth looking at a few different examples here and thinking through what would be intuitive. For example, if you have a line with only whitespace, should that be ignored for figuring out the initial indent level? My initial ideas on this:
|
I think a parse error would be more useful here. First line indented and some lines below not is most likely an accident. And if the smallest indentation counts, this accident will result in incorrect output, e.g. some code blocks in the beginning. I'm not sure if it's compatible with the design goals of Elm Markdown, but maybe we can be even more strict and require multi-line content inside HTML tag to always be indented? Just a thought. |
Observed: Leading whitespace appears to cause the parser to see a code block within an HTML block.
Expected: Whitespace within an HTML block should be treated the same as whitespace in HTML, i.e. for the most part it is insignificant. The examples of HTML blocks in the GFM spec appear to show that nothing within an HTML block should be interpreted as Markdown.
See this example; screenshot below:
Related to #50, #70, and #102.
The text was updated successfully, but these errors were encountered: