Closed calebk1 closed 1 year ago
Thanks, @calebk1. We'll take a look.
Here is the list of default supported languages by the highlighter.
[
"plain",
"plaintext",
"text",
"txt",
"markup",
"html",
"mathml",
"svg",
"xml",
"ssml",
"atom",
"rss",
"css",
"clike",
"javascript",
"js",
]
Unfortunately, I can only add one at a time, not all available languages. "shell" is not available, so I added "bash". Let me know what other languages you need besides the core languages.
As requested, I added http, json and bash.
@geverit4 - Is it possible to preview the code block content in a generic form even if the language isn't specified?
In theory, we should support all prismjs languages:
As a further comment, I think shell is just an alias of bash - I was basing it off of the GitHub flavoured markdown list: https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml
Can we add YAML?
I tried to add all prismjs languages - but was unsuccessful in the attempt. The best I could do was explicitly specify each language that needs to be supported individually. According to the PrismJS docs, it should be possible - but so far no luck. I will add yaml explicitly in the next release if I cannot get all the languages working.
Is there a temporary workaround for this issue that would allow writers to see their code block text regardless of language?
All languages should be showing up regardless of highlighting in version 2.0.10.
Nice. When that's ready, I'll ask Jorge to resubmit to store.
Fixed in 2.0.10, which will be available to writers when the plugin is updated in the store. I'm closing this issue.
When doing a code block, the preview does not render for the following languages:
http
json
shell