-
Notifications
You must be signed in to change notification settings - Fork 62
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
Corner cases for fenced div attributes #48
Comments
@Omikhleia ping |
As for (1), the backtick issue is noted in #46. I would consider it very minor -- I don't quite see the real-world use case for backtick in attribute values (frankly, how many people would need this? I'd bet most logical usages are in the line of As for (2), it could be interested to check why Pandoc explicitly forbid empty divs, at the time they designed that beast. I found discussions on the mailing lists, but it's a very long read and I failed so far to find a clean formal syntax definition (I suspect one could say the code is the syntax, lol, but my skills in reading Haskell are close to none) |
True, but you never know. We will need to make a backtick-happy infostring pattern for #49. Might as well use it here.
Without attributes, it would be impossible to differentiate between an opening and closing fences in the following markdown text: :::
Fenced Divs can be nested
:::
This is a nested Div
:::
::: With attributes, we can easily differentiate between opening and closing fences, completely context-free. |
Closed via #51. |
In #36, we added support for Pandoc's fenced divs. However, the fenced div attributes are treated as infostrings and only matched at capture time, which has a number of repercussions:
Our implementation parses attributes as fenced code infostrings. Infostrings may not contain backticks, whereas attributes may (in Pandoc):
Divs with empty infostrings are not divs. Consider the following document:
Pandoc converts this document to the following HTML output:
<p>::: foo :::</p>
, where as we still consider this a div.The text was updated successfully, but these errors were encountered: