-
Notifications
You must be signed in to change notification settings - Fork 43
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
Lines inside fenced code blocks that start with an octothorpe are interpreted as headers and break folding #35
Comments
My apologies for the delay. Thanks for the nice writeup and use-case @rpdelaney I'll try and set aside some time to look at this. If you come up with a PR that addresses it I'll happily merge it. |
quick note for future me: As the title suggests, the problem is essentially that it's not ignoring headings contained in code fences. eg
|
@masukomi Any progress on this? |
Also experiencing this issue and would love a fix! Thanks for a great plugin @masukomi 🙂 |
@wesrer just haven't gotten around to working on this. Will happily accept PRs (cc @noperator ) ;) |
Strangely, I'm encountering this issue a bit inconsistently. I tried to reproduce @rpdelaney's example above by downloading the file as is, and opening it in vim.
Here's what I'm seeing:
I'll report back here if I can reproduce an octothorpe within fenced code blocks that breaks folding. |
Following this guidance (https://github.com/tpope/vim-markdown) while trying to troubleshoot this issue (masukomi/vim-markdown-folding#35).
I noticed that wherever leading octothorpes inside fenced code blocks were interpreted by this plugin as a header, those lines were also highlighted as headers—i.e., for some reason, Vim's included syntax highlighting wasn't recognizing those lines as being inside of a code block. That's likely the root issue here since this plugin's vim-markdown-folding/after/ftplugin/markdown/folding.vim Lines 67 to 76 in 3f35acf
I think I solved this issue (in my case, at least) by following some guidance from
I kept increasing |
This looks very much along the lines of #1. Possibly related to #6 also (but I kinda doubt it).
Using vim-markdown-folding with vim-plug, on 3f35acf. I'm observing a problem when editing this file I'm working on.
Looks like this:
I would expect something more like this (maybe with different counts of folded lines):
The text was updated successfully, but these errors were encountered: