Skip to content

Commit c9f4eb1

Browse files
committed
Merge pull request #166 from dmytri/master
added endash and emdash support to syntaxt
2 parents fafae61 + c8f17c9 commit c9f4eb1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

syntax/pandoc.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,16 @@ if g:pandoc#syntax#newlines == 1
444444
call s:WithConceal("newline", 'syn match pandocNewLine /\( \|\\\)$/ display containedin=pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocStrongInEmphasis,pandocEmphasisInStrong', 'conceal cchar='.s:cchars["newline"])
445445
endif
446446
"}}}
447+
" Emdashes: {{{3
448+
if &encoding == "utf-8"
449+
call s:WithConceal("emdashes", 'syn match pandocEllipses /\([^-]\)\@<=---\([^-]\)\@=/ display', 'conceal cchar=—')
450+
endif
451+
" }}}
452+
" Endashes: {{{3
453+
if &encoding == "utf-8"
454+
call s:WithConceal("endashes", 'syn match pandocEllipses /\([^-]\)\@<=--\([^-]\)\@=/ display', 'conceal cchar=–')
455+
endif
456+
" }}}
447457
" Ellipses: {{{3
448458
if &encoding == "utf-8"
449459
call s:WithConceal("ellipses", 'syn match pandocEllipses /\.\.\./ display', 'conceal cchar=…')

0 commit comments

Comments
 (0)