Skip to content

Commit a70f346

Browse files
Kirk Roemerchrisbra
authored andcommitted
runtime(rst): Enable spell checking for more syntax constructs
Enable spell checking for more recognised constructs: * comments * footnotes * citations * directives * inline markup (*text*, **text**, ...) related: #18566 Signed-off-by: Kirk Roemer <[email protected]> Signed-off-by: Marshall Ward <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent d7fb4cd commit a70f346

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

runtime/syntax/rst.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ execute 'syn region rstCitation contained matchgroup=rstDirective' .
7878
execute 'syn region rstFootnote contained matchgroup=rstDirective' .
7979
\ ' start=+\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]\_s+' .
8080
\ ' skip=+^$+' .
81-
\ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell'
81+
\ ' end=+^\s\@!+ contains=@Spell,@rstCruft'
8282

8383
syn region rstHyperlinkTarget contained matchgroup=rstDirective
8484
\ start='_\%(_\|[^:\\]*\%(\\.[^:\\]*\)*\):\_s' skip=+^$+ end=+^\s\@!+
@@ -92,7 +92,7 @@ syn region rstHyperlinkTarget matchgroup=rstDirective
9292
execute 'syn region rstExDirective contained matchgroup=rstDirective' .
9393
\ ' start=+' . s:ReferenceName . '::\_s+' .
9494
\ ' skip=+^$+' .
95-
\ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock,rstExplicitMarkup'
95+
\ ' end=+^\s\@!+ contains=@Spell,@rstCruft,rstLiteralBlock,rstExplicitMarkup'
9696

9797
execute 'syn match rstSubstitutionDefinition contained' .
9898
\ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
@@ -106,10 +106,10 @@ function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_righ
106106
endif
107107

108108
if a:start != '``'
109-
let rst_contains=' contains=rstEscape' . a:name
109+
let rst_contains=' contains=@Spell,rstEscape' . a:name
110110
execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.first.'+'.' contained'
111111
else
112-
let rst_contains=''
112+
let rst_contains=' contains=@Spell'
113113
endif
114114

115115
execute 'syn region rst' . a:name .

0 commit comments

Comments
 (0)