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

Allow raw prefix on code block languages #38

Merged
merged 1 commit into from
Jan 8, 2021
Merged

Allow raw prefix on code block languages #38

merged 1 commit into from
Jan 8, 2021

Conversation

leebyron
Copy link
Owner

@leebyron leebyron commented Jan 8, 2021

Based on proposal in #31

Prettier likes to format embedded code blocks in our markdown. Generally, we like this too, except when we don't. Sometimes we deliberately want to format something "weird" to demonstrate that our language supports that; in those cases we don't want prettier to undo our "weird" formatting. To achieve this, we can use a raw codeblock

However the implementation differs by requiring a space before the language name (which still thwarts tools like GH and prettier) and makes this part of the parsed AST rather than part of the highlight function name.

Based on proposal in #31

> Prettier likes to format embedded code blocks in our markdown. Generally, we like this too, except when we don't. Sometimes we deliberately want to format something "weird" to demonstrate that our language supports that; in those cases we don't want prettier to undo our "weird" formatting. To achieve this, we can use a raw codeblock

However the implementation differs by requiring a space before the language name (which still thwarts tools like GH and prettier) and makes this part of the parsed AST rather than part of the highlight function name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant