Skip to content

When used with Spinx / docutils, allow inserting nodes at the upper level #1072

@lumag

Description

@lumag

Describe the feature you'd like to request

I have a main .rst file, which then uses include:: foo.md / :parser: myst_parser.sphinx_ to include the MarkDown document. The MarkDown document is supposed to be a complete section (including the section title), however per the documentation MyST pushes parsed document under the current section (as a subsection). While it is possible to add new section for the MD file in the main document, it also brings undesirable side effect of a duplicate section (and subsection headers).

Cut-down example:

  • main.rst:
******************
CI-tron Components
******************

The executor service
====================

some text of the section


.. include:: salad/README.md
   :parser: myst_parser.sphinx_
  • salad/README.md
# SALAD
some other texxt

Resulting section structure:

# CI-tron Components
## The executor service
### SALAD

Desired section structure:

# CI-tron Components
## The executor service
## SALAD

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions