Skip to content

Allow regex in toctree directive. #6650

Open
@mjstahlberg

Description

@mjstahlberg

:glob: is pretty useful, but it doesn't seem to enable the following:

  • Include all documents named package.[…] but don't include any documents named package.[…].[…].

The reverse selection of only including documents that begin with package and contain two dots can be made with package.*.*. I tried package.[!.]* but the [!.] seems to not interact with the * but only affect a single character.

I propose the addition of a :regex: option to the toctree directive using Python's builtin regex package. It should be relatively easy to implement and work around any shortcomings of :glob: that users might encounter.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions