Skip to content

doctest blocks #38

@anntzer

Description

@anntzer

I just discovered that rst has direct support for doctest blocks: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#doctest-blocks

It looks like syntax/rst.vim had at some point some support for them:

syn region  rstDoctestBlock         oneline display matchgroup=rstDelimiter
      \ start='^>>>\s' end='^$'

but that region declaration is clearly wrong (the "oneline" must be removed, as the end marker never matches on the same line as the start marker).

In addition, it would be nice if these (more specifically, the lines starting with >>> or with ...) could be highlighted using python syntax (say, if "python" is in g:rst_syntax_code_list).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions