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
Is your feature request related to a problem? Please describe.
This is a proposal to change parsing of MyST comments.
Example Markdown:
% This is the first line of a comment, but it's a long comment so
% here's the second line.
MyST comments are currently parsed so that each line is its own token. Looking at the example Markdown above, it would feel natural to me if the comment was one continuous block however.
This would be in line with how CommonMark block quotes and code blocks are parsed:
> This is one multiline> block quote!This is one multilineindented code block!
This change would:
Make the syntax structure more intuitive and in line with existing CommonMark.
Simplify rendering and enable word wrapping in renderers such as mdformat-myst.
Describe the solution you'd like
Parse a token similar to fence. That is, a single token (no openers or closers), and have all the multiline content in token.content.
The text was updated successfully, but these errors were encountered:
If I do end up making a PR, another thing I'd like to change is to not strip line leading whitespace. This is because comments (at least in proper coding languages) sometimes do stuff like
# ⬇ This is the second argdeffunc(arg1, arg2):
pass
or have ASCII art or whatever in them. Stripping leading whitespace makes these things unrecoverable.
Is your feature request related to a problem? Please describe.
This is a proposal to change parsing of MyST comments.
Example Markdown:
MyST comments are currently parsed so that each line is its own token. Looking at the example Markdown above, it would feel natural to me if the comment was one continuous block however.
This would be in line with how CommonMark block quotes and code blocks are parsed:
This change would:
mdformat-myst
.Describe the solution you'd like
Parse a token similar to
fence
. That is, a single token (no openers or closers), and have all the multiline content intoken.content
.The text was updated successfully, but these errors were encountered: