mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 05:53:50 -05:00
Update
This commit is contained in:
@@ -94,16 +94,21 @@ execute 'syn match rstSubstitutionDefinition contained' .
|
||||
\ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
|
||||
|
||||
function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right)
|
||||
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.a:start.'+'.' contained'
|
||||
|
||||
execute 'syn region rst' . a:name .
|
||||
\ ' start=+' . a:char_left . '\zs' . a:start .
|
||||
\ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
|
||||
\ a:middle .
|
||||
\ ' end=+\S' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+'
|
||||
\ ' end=+' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+' .
|
||||
\ ' contains=rstEscape' . a:name
|
||||
|
||||
execute 'hi def link rstEscape'.a:name.' Special'
|
||||
endfunction
|
||||
|
||||
function! s:DefineInlineMarkup(name, start, middle, end)
|
||||
let middle = a:middle != "" ?
|
||||
\ (' skip=+\\\\\|\\' . a:middle . '+') :
|
||||
\ (' skip=+\\\\\|\\' . a:middle . '\|\s' . a:middle . '+') :
|
||||
\ ""
|
||||
|
||||
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
|
||||
|
||||
Reference in New Issue
Block a user