python3 syntax highlighting currently not working
See original GitHub issueWhat is the problem?
Code blocks that are marked with python3 are not highlighted.
How can I reproduce it?
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.
Additional details
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).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Syntax highlighting breaks on Python3 return type hinting #862
Following a return type hint on a function definition, the syntax coloring is broken. def f(x : bool): '''Summary that has good syntax...
Read more >Syntax highlighting not working for Python in VS Code with ...
Basically syntax highlighting is a VS Code thing, not an extension thing. I would try changing your theme and see if that leads...
Read more >Can't get syntax highlighting for Python 3 on vim - Reddit
I do have +python3 when vim --version. Can't seem to figure out what is the problem. Syntax highlighting for python (2) works well....
Read more >How can I fix "missing" syntax highlighting for Python ...
1 Answer 1 · In syntax/<filetype>.vim the syntax rules are defined with the :syntax command. This command defines, well, syntax. · :highlight says ......
Read more >PyQt/Python syntax highlighting
I modified this code to fix a problem when triple-quotes were embedded inside strings. -- Artemio Garza Reyna 2021-08-08 20:26:00.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
highlightjs/highlight.js#2633
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 supportpython3
.