Code blocks that are marked with python3 are not highlighted.

Here is the markdown of a random Leetcode problem: https://gist.github.com/parkershamblin/bde8ad0db5f1e78a68dc11c98b59d06a After downloading it and opening it up in vscode try running the command: Markdown: Print current document to HTML
The resulting html page should look like the one shown above.
If you edit the markdown and change "python3" to "python" in front of the code blocks you will get syntax highlighting and the resulting html page will look like this.

This is my current solution. However, you can see that the syntax highlighting is not 100% accurate with this approach (i.e. type hinting not being supported).
This is handled by VSCode's built-in Markdown extension
(https://github.com/microsoft/vscode/blob/eed137ff2ef7d6b96aa9a7b41307b4c21cda4627/extensions/markdown-language-features/src/markdownEngine.ts#L326-L335)
which uses highlight.js that doesn't seem to support python3.
IIRC, it's called syntax highlighting for embedded languages. The highlighting engine detects embedded languages in parent file, and redirect them to proper extensions that support the language.
So far, scope redirection for code blocks in Markdown is provided by VS Code's built-in vscode.markdown extension. Sadly, it provides python but not python3 (see meta.embedded.block.python scope, which captures fenced code blocks whose language identifier matches regexp (python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\{\.python.+?\})). You can look up in its TM grammars (syntaxes/markdown.tmLanguage.json) and contribution (package.json) to confirm this.
Additionally, I did a quick search in Marketplace, but cannot find any extension that contributes to python3. Those that provide syntax highlighting for Python 3 contribute grammars to language python.
Wow, I have no idea how to solve this problem.
Oops, sorry for the noise.
I thought you were talking about highlighting in editor.
@Lemmingh Thanks for the input 馃槈.
This is handled by VSCode's built-in Markdown extension
(https://github.com/microsoft/vscode/blob/eed137ff2ef7d6b96aa9a7b41307b4c21cda4627/extensions/markdown-language-features/src/markdownEngine.ts#L326-L335)
which useshighlight.jsthat doesn't seem to supportpython3.
Thank you for the quick follow up. Yes, I actually tried installing highlight.js on my own to see if I could fix the problem but as you mentioned it doesn't look like highlight.js python3 syntax highlighting works properly right now.
Hope VSCode will adopt a better syntax highlighter in the future.
highlightjs/highlight.js#2633
Most helpful comment
highlightjs/highlight.js#2633