We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, for file
# Bug report ## Description Description header is not detected. # Workaround ## Description Add an empty line before the header.
vim-pandoc-syntax conceals it to .
This problem was introduced in 634d830. That change fixes incorrect detection of headers in the middle of paragraphs, but is a bit too strict.
The text was updated successfully, but these errors were encountered:
This patch seems to fix the issue without adverse effects:
diff --git i/syntax/pandoc.vim w/syntax/pandoc.vim index 38df7f1..9cdd83f 100644 --- i/syntax/pandoc.vim +++ w/syntax/pandoc.vim @@ -400,7 +400,7 @@ call s:WithConceal('strikeout', 'syn match pandocStrikeoutMark /\~\~/ contained " }}}2 " Headers: {{{2 -syn match pandocAtxHeader /\(\%^\|<.\+>.*\n\|^\s*\n\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display +syn match pandocAtxHeader /\(\%^\|<.\+>.*\n\|^\s*\n\|^#\{1,6}.*\n\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display syn match pandocAtxHeaderMark /\(^#\{1,6}\|\\\@<!#\+\(\s*.*$\)\@=\)/ contained containedin=pandocAtxHeader call s:WithConceal('atx', 'syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark', 'conceal cchar='.s:cchars['atx']) syn match pandocSetexHeader /^.\+\n[=]\+$/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
Sorry, something went wrong.
Here is a cleaner workaround before this patch can be merged to the upstream. Add these to vimrc:
augroup consecutive_heading au! au filetype pandoc syn clear pandocAtxHeader au filetype pandoc syn match pandocAtxHeader /\(\%^\|<.\+>.*\|^\s*\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display augroup END
No branches or pull requests
Hello, for file
vim-pandoc-syntax conceals it to
.
This problem was introduced in 634d830. That change fixes incorrect detection of headers in the middle of paragraphs, but is a bit too strict.
The text was updated successfully, but these errors were encountered: