]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(rst): Fix doctest block syntax
authorKirk Roemer <91125534+kirk-roemer@users.noreply.github.com>
Mon, 13 Oct 2025 18:24:09 +0000 (18:24 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 13 Oct 2025 18:24:09 +0000 (18:24 +0000)
commit0940465866486db47baa1fe85ebefb6e6fe54612
tree8764e9bfc7fda5cf416c1e7e6941507e84cc1332
parentc58f91c035db09358c282f2a908e2aea4287785e
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>
runtime/syntax/rst.vim