Syntax highlighting stops working when indented
See original GitHub issueInitial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
VSCode MDX v0.3.2
Link to runnable example
No response
Steps to reproduce
Use the attached MDX file in archive in VSCode 1.69.2 with VSCode MDX v0.3.2.
vscode-mdx-indent-test.mdx.zip
Expected behavior
Syntax highlighting should preferably happen at all times, meaning:
- if inside wrapper (either indented or not)
- if indented
If the markdown usage of tabs conflicts with this, then at least the wrappers should work.
Actual behavior
First of all, thanks for a cool extension!
It stops working for me however when it is indented and/or wrapped in another element.
Here’s the MDX in question (I’ve attached the file above):
## Heading highlighted
<Wrapper>
## Heading not highlighted
- List item 1
- List item 2
</Wrapper>
## This is also not highlighted
<Wrapper>
## Neither is this
</Wrapper>
I use a lot of wrappers in my MDX files, so this sort of breaks the extension for me…
Runtime
No response
Package manager
No response
OS
macOS
Build and bundle tools
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Syntax highlighting and indentation not working at the end of a ...
If syntax highlighting or indentation suddenly stops working as expected at some point in your buffer/file, there's a very good chance you ...
Read more >Syntax highlighting not working at high indentation levels : r/vim
Hello,. I've found that my markdown and spelling syntax highlighting do not work when I have more than two tabs on a line....
Read more >Syntax highlight breaks when Bash heredocument delimiter is ...
Syntax highlight breaks when Bash heredocument delimiter is indented: Indented. indented. Not indented. not indented. Why this phenomenon shouldn't happen.
Read more >Bug: Code editor syntax highlighting and auto-indent
In most cases, the auto-indentation and the syntax highlighting works as intended/expected, such as when typing if <some expression> then ...
Read more >Dockerfile sintax highlight doesn't work on 4-space-indented ...
I indent with 4 spaces all instructions (except FROM) in my Dockerfile, ... But in visual studio, when I do this, the syntax...
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
Same here (using
v1.0.3
):No-indent “workaround”:
With indent “workaround”:
I can also confirm the exact behavior as outlined above. Would love to know if there is a solution to this or if peeps are even properly aware of it. (:
It doesn’t even need opening and closing tags to be indented. As soon as the opening tag is not indented it starts failing to highlight the inner markdown. Doesn’t seem to break everything though, as HTML is still working fine.