-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken Markdown Syntax Highlighting since 1.3.0 #9075
Comments
These seem more like issues in the language\tmlanguage and not simple theme\tmtheme issues. Every single theme has these issues that I have tried. While Dark and Dark+ may have fixed the bullet part, all of the other issues are still present. |
I edited the original post, I hadn't used code for markdown in a while and was attempting to finally switch. It appears the syntax for markdown used to be pretty decent, but some recent changes have made it terribly broken. To the point it is unusable for me. I checked an older version of code and the syntax works just fine. None of the issues highlighted here were issues in the earlier version. |
Here is a nice example with a table and escaped regex that is broken: proper highlighting in Github### regular expressions
<table>
<tbody>
<tr><td>`^`</td><td>Begin</td></tr>
<tr><td>`$`</td><td>End</td></tr>
<tr><td>`.`</td><td>any character</td></tr>
<tr><td>`[A-Z]`</td><td>range</td></tr>
<tr><td>`\d`</td><td>digit</td></tr>
<tr><td>`?`</td><td>0 or 1</td></tr>
<tr><td>`+`</td><td>1 or more</td></tr>
<tr><td>`*`</td><td>0 or more</td></tr>
<tr><td>`[^a]`</td><td>except a</td></tr>
<tr><td>`\\`</td><td>escape sequence</td></tr>
<tr><td>`\w`</td><td>whitespace</td></tr>
<tr><td>`\s`</td><td>space</td></tr>
</tbody>
</table> markdown table syntax (not working)| `^` | Begin
| `$` | End
| `.` | any character
| `[A-Z]` | range
| `\d` | digit
| `?` | 0 or 1
| `+` | 1 or more
| `*` | 0 or more
| `[^a]` | except a
| `\\` | escape sequence
| `\w` | whitespace
| `\s` | space broken highlighting in Codebroken rendering in Code |
seems like the Markdown plugin uses markdown-it for markdown rendering and highlight.js for syntax highlighting of code blocks. it delegates the view of markdown sourcecode to the text editor of code. so its probably not an issue of the extension. |
ref #8214 |
Any updates on this? |
@MovGP0 The syntax highlighting of your examples seems to have been fixed: The renderer uses commonmark, which does not yet support tables in markdown, so the second example is not rendered as a table. The incorrect rendering of the second example is therefore expected, but most users are probably used to github flavored markdown. Please give the latest insiders builds a try and open bugs for any issue you notice. Thanks. |
@gerane Can you please try out the latest insiders builds to see what has been fixed. We've made a number of fixes to the markdown grammar, and these may resolve many of problems you were seeing. I'm going to close this issue, but if you are still seeing any syntax highlighting problems, please open new issues for these (smaller issues are generally better). Please include the markdown source to help with investigation and testing. Thanks |
EDIT: most of these issues appear to be from 1.3.0. If I try the same files in an earlier version of code, they look closer to those in the atom examples. I added a pre 1.3.0 VSCode image to example 2. None of the other issues such as bold, italics, html, code blocks, or anything else have issues in earlier versions. These all seem to have been introduced recently when making markdown its own language I am guessing.
I use markdown for writing documentation and blog posts, and this is the one thing keeping me from 100% moving to VSCode. The syntax is so poor that I have to continue using atom for things like blog posts, which is ironic since half my posts these days are about VSCode. I am adding a few pictures to show how bad VSCode is in comparison to Atom and point out some of the areas that need improvement.
Example 1
VSCode
Atom
Example 2
VSCode Pre 1.3.0
VSCode
Atom
You get the same poor results in pretty much every theme.
A few of the issues that stand out:
There are likely some other issues, but they are escaping me right now. I will try to update this if I can remember any others.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: