Skip to content

Commit 75d6b2c

Browse files
authored
Add configuration option for conceal chars for quotations (#381)
1 parent ff52ed9 commit 75d6b2c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

syntax/pandoc.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ if &encoding ==# 'utf-8'
5151
\'definition': ' ',
5252
\'li': '•',
5353
\'html_c_s': '‹',
54-
\'html_c_e': '›'}
54+
\'html_c_e': '›',
55+
\'quote_s': '“',
56+
\'quote_e': '”'}
5557
else
5658
" ascii defaults
5759
let s:cchars = {
@@ -543,8 +545,8 @@ endif
543545

544546
" Quotes: {{{3
545547
if &encoding ==# 'utf-8'
546-
call s:WithConceal('quotes', 'syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display', 'conceal cchar=')
547-
call s:WithConceal('quotes', 'syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display', 'conceal cchar=')
548+
call s:WithConceal('quotes', 'syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display', 'conceal cchar='.s:cchars['quote_s'])
549+
call s:WithConceal('quotes', 'syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display', 'conceal cchar='.s:cchars['quote_e'])
548550
endif
549551
" }}}3
550552

0 commit comments

Comments
 (0)