Skip to content

Commit 23ec975

Browse files
authored
Fix regex to match emphasis with alpha at end (#372)
1 parent 4dfb5bd commit 23ec975

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

syntax/pandoc.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ endif
160160
" Functions: {{{1
161161
" EnableEmbedsforCodeblocksWithLang {{{2
162162
function! EnableEmbedsforCodeblocksWithLang(entry)
163-
" prevent embedded language syntaxes from changing 'foldmethod'
163+
" prevent embedded language syntaxes from changing 'foldmethod'
164164
if has('folding')
165165
let s:foldmethod = &l:foldmethod
166-
let s:foldtext = &l:foldtext
166+
let s:foldtext = &l:foldtext
167167
endif
168168

169169
try
@@ -243,7 +243,7 @@ endif
243243

244244
" Embeds: {{{2
245245

246-
" prevent embedded language syntaxes from changing 'foldmethod'
246+
" prevent embedded language syntaxes from changing 'foldmethod'
247247
if has('folding')
248248
let s:foldmethod = &l:foldmethod
249249
endif
@@ -349,8 +349,8 @@ syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICi
349349
" Text Styles: {{{2
350350

351351
" Emphasis: {{{3
352-
call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
353-
call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
352+
call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\a\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
353+
call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\a\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
354354
" }}}3
355355

356356
" Strong: {{{3

0 commit comments

Comments
 (0)