Skip to content

Directives need to distinguish between arguments, options, and content #11

@flying-sheep

Description

@flying-sheep

The directive block is separated from the rest by a blank line, but the parser simply outputs text nodes ignoring blank lines.

e.g. the following rST…

.. figure:: larch.png
   :scale: 50

   The larch.

parses to

{
  "type": "document",
  "children": [
    {
      "type": "directive",
      "directive": "figure",
      "children": [
        {
          "type": "text",
          "value": "larch.png"
        },
        {
          "type": "text",
          "value": ":scale: 50"
        },
        {
          "type": "text",
          "value": "The larch."
        }
      ]
    }
  ]
}

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