Closed mcandre closed 5 years ago
This package has the same feature, but it does not recognize every language. console
from your example indeed doesn't work. You can make a suggestion by what language package your code should be handled, and it's mostly likely trivial to add support for this.
Ha, I foeget where I originally saw console
used, but ever since, I’ve been noting it for my terminal snippets. Is there a better language name to use here?
Note that sh/bash wouldn’t be quite right, as the snippets begin with a prompt, either dollar for UNIX snippets or greater-than for Windows snippets.
I've mirrored the code from the language-gfm repo (https://github.com/atom/language-gfm/blob/master/grammars/gfm.cson#L609-L625). It uses either shellsession
or console
as language name.
I'll publish it in the next version. Might take a little while though.
GitHub Flavored Markdown allows code blocks to indicate the syntax name by placing the name immediately after the opening triple backticks:
However, language-markdown is not aware of this feature and mistakenly renders the entire code block, backticks and all, as normal paragraph text in the main file editor view.
The markdown preview pane is unaffected by this glitch.