yzhang-gh / vscode-markdown

Markdown All in One
https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
MIT License
2.9k stars 322 forks source link

Code Blocks Without Language Not Formatted in Markdown Files #1446

Open sohang3112 opened 2 months ago

sohang3112 commented 2 months ago

What's the problem

In VS Code, when a markdown file is open, code blocks without a specified language are not getting formatted in the source code view. However, these blocks are formatted correctly in the markdown preview.

What's the expected result

Code blocks with no specified language should be formatted in a single color (eg. green).

How to reproduce

  1. Open a markdown file in Visual Studio Code.
  2. Add a code block without specifying a language.
  3. The code block isn't formatted in markdown source code view (but is rendering correctly in Markdown Preview).

Other information

Example screenshot - code without language isn't formatted, but with language (python) is: screenshot

sohang3112 commented 1 month ago

@yzhang-gh Please check if you can reproduce this issue on your machine - do you know of any solution to this issue?? If not, I would like to raise a PR to fix this issue - please confirm that you would be interested in merging such a PR.

sohang3112 commented 1 month ago

@yzhang-gh please respond