AdobeDocs / adobe-markdown-authoring

Adobe Markdown Authoring for Visual Studio Code
Apache License 2.0
2 stars 2 forks source link

Code Blocks preview not rendering #47

Closed calebk1 closed 1 year ago

calebk1 commented 1 year ago

When doing a code block, the preview does not render for the following languages:

bbringhu commented 1 year ago

Thanks, @calebk1. We'll take a look.

geverit4 commented 1 year ago

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.

bbringhu commented 1 year ago

@geverit4 - Is it possible to preview the code block content in a generic form even if the language isn't specified?

bbringhu commented 1 year ago

In theory, we should support all prismjs languages:

https://prismjs.com/#supported-languages

calebk1 commented 1 year ago

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

hguthrie commented 1 year ago

Can we add YAML?

geverit4 commented 1 year ago

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.

bbringhu commented 1 year ago

Is there a temporary workaround for this issue that would allow writers to see their code block text regardless of language?

geverit4 commented 1 year ago

All languages should be showing up regardless of highlighting in version 2.0.10.

Screenshot 2023-06-08 at 3 38 35 PM

bbringhu commented 1 year ago

Nice. When that's ready, I'll ask Jorge to resubmit to store.

bbringhu commented 1 year ago

Fixed in 2.0.10, which will be available to writers when the plugin is updated in the store. I'm closing this issue.