diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-06-08 12:44:15 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-06-08 12:44:15 +0200 |
commit | 671078ef6c851b688b63165761cec82f9f6e03f7 (patch) | |
tree | efde30baaf2ca21a09a35e1ccf1d2ff744482d2b /syntax/rst.vim | |
parent | aebef2c2e76b88384b1121c237c965e8cf8b3bcb (diff) | |
download | vim-polyglot-671078ef6c851b688b63165761cec82f9f6e03f7.tar.gz vim-polyglot-671078ef6c851b688b63165761cec82f9f6e03f7.zip |
Update
Diffstat (limited to 'syntax/rst.vim')
-rw-r--r-- | syntax/rst.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/syntax/rst.vim b/syntax/rst.vim index 89f46e64..a875a44b 100644 --- a/syntax/rst.vim +++ b/syntax/rst.vim @@ -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, "'", "'") |