0
0
mirror of https://github.com/vim/vim.git synced 2025-10-16 07:24:23 -04:00
Commit Graph

25 Commits

Author SHA1 Message Date
Antony Lee
4e9f16dd1e runtime(rst): Correctly end nested comments
Previously, a comment in a directive block would incorrectly mark
all subsequent lines in the directive block as comment, because the
syn-region did not check the leading indent.

related: #18566

Signed-off-by: Antony Lee <anntzer.lee@gmail.com>
Signed-off-by: Marshall Ward <marshall.ward@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-10-13 18:28:58 +00:00
Minjie Xu
47949b4b46 runtime(rst): Fix highlights nested in directive body
The leading two dots of a RST directive gets matched by
rstExplicitMarkup group first, and then the directive name and directive
body will be matched by the groups contained in rstDirectives cluster in
order.

The rstExDirective group in rstDiretives matches any RST directives
other than footnote, citation and hyperlink target, therefore admonition
and code block will be matched by rstExDirective. This fix has
rstExDirective contain rstExplicitMarkup so as to enable recursive RST
directives match.

The interpreted texts enclosed in quotes are not highlighted within a
RST directive body, because the rstCruft cluster contains a non-existing
rstInterpretedText group.It should be renamed to
rstInterpretedTextOrHyperlinkReference which is defined in a
DefineInlineMarkup function call.

related: #18566

Signed-off-by: Minjie Xu <madjxatw@gmail.com>
Signed-off-by: Marshall Ward <marshall.ward@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-10-13 18:27:49 +00:00
Dragan Simic
310082f3cf runtime(rst): Add support for rst_minlines
Following the approach used in other syntax definitions, add support for
defining the "syntax sync minlines=..." values for rst files in the
users' ~/.vimrc files, to allow the users to adjust that value in case
syntax highlighting stops working for some of the files they edit.

related: #18566

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Marshall Ward <marshall.ward@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-10-13 18:26:54 +00:00
Kirk Roemer
0940465866 runtime(rst): Fix doctest block syntax
A doctest block usually spans multiple lines, e.g.

>>> print('this is a Doctest block')
this is a Doctest block

Remove ``oneline`` argument to syntax region as this requirement is not
met.  Consequently, also remove ``display`` as the prerequisite (the
syntax region is on a single line) is no longer met.

----

Recognise '>>>' inside doctest blocks

Recognise subsequent '>>>' prompts in doctest blocks, e.g.

>>> print('this is a Doctest block')
this is a Doctest block
>>> print('this is a second Doctest block')
this is a second Doctest block
A doctest block usually spans multiple lines, e.g.

>>> print('this is a Doctest block')
this is a Doctest block

related: #18566

Signed-off-by: Kirk Roemer <91125534+kirk-roemer@users.noreply.github.com>
Signed-off-by: Marshall Ward <marshall.ward@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-10-13 18:24:09 +00:00
Bram Moolenaar
d1caa941d8 Update runtime files 2020-04-10 22:10:56 +02:00
Bram Moolenaar
4c05fa08c9 Update runtime files 2019-01-01 15:32:17 +01:00
Bram Moolenaar
91f84f6e11 Update runtime files. 2018-07-29 15:07:52 +02:00
Bram Moolenaar
7571d55f7d Updated runtime files. 2016-08-18 22:54:46 +02:00
Bram Moolenaar
a02a551e18 Updated runtime files. 2016-06-17 12:48:11 +02:00
Bram Moolenaar
345efa013d Update runtime files 2016-01-15 20:57:49 +01:00
Bram Moolenaar
12969c04fe Update documentation and syntax files. 2015-09-08 23:36:10 +02:00
Bram Moolenaar
7d76c804af Update runtime files and translations. 2014-10-15 22:51:52 +02:00
Bram Moolenaar
7b61a546d8 Runtime file updates. 2014-08-23 15:31:19 +02:00
Bram Moolenaar
3678208477 Updated runtime files. 2013-11-28 13:53:34 +01:00
Bram Moolenaar
203d04d764 Updated runtime files. 2013-06-06 21:36:40 +02:00
Bram Moolenaar
97d62497f5 Updated runtime files. 2012-11-15 21:28:22 +01:00
Bram Moolenaar
9b4512500a Update runtime files. 2012-08-15 17:43:31 +02:00
Bram Moolenaar
6dfc28be25 Updated runtime files. 2010-02-11 14:19:15 +01:00
Bram Moolenaar
5c73622a90 Update runtime files. 2010-01-06 20:54:52 +01:00
Bram Moolenaar
25394022f2 updated for version 7.1b 2007-05-10 19:06:20 +00:00
Bram Moolenaar
779b74b2a2 updated for version 7.0d 2006-04-10 14:55:34 +00:00
Bram Moolenaar
899dddf888 updated for version 7.0b02 2006-03-26 21:06:50 +00:00
Bram Moolenaar
0dc065ee7c updated for version 7.0102 2005-07-04 22:49:24 +00:00
Bram Moolenaar
42eeac3552 updated for version 7.0097 2005-06-29 22:40:58 +00:00
Bram Moolenaar
071d4279d6 updated for version 7.0001 2004-06-13 20:20:40 +00:00