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
But when you do this instead of a triple-backticked code block, you lose out on syntax highlighting. Would it be possible to convert indented code blocks into backticked Julia ones?
The text was updated successfully, but these errors were encountered:
The parser in the Markdown stdlib does not distinguish between triple-backticked and indented code blocks (i.e. the resulting AST is the same). So the only way to achieve this would be to always apply Julia highlighting to all code blocks that do not specify the language. However, I am a bit hesitant, as that goes against how Markdown code blocks are meant to be interpreted in my opinion.
I guess, another way would be to special-case this particular use case -- the first code block in a docstring gets highlighted as Julia (unless another language is explicitly specified).
Thanks for this info. I'm also a little hesitant of defaulting to Julia, maybe an alternative could be an opt-in makedocs option which sets the default?
I do also like the special case idea.
The usual convention for docstrings is to do something like this:
But when you do this instead of a triple-backticked code block, you lose out on syntax highlighting. Would it be possible to convert indented code blocks into backticked Julia ones?
The text was updated successfully, but these errors were encountered: