Skip to content

Errors are too strict, and break downstream rendering/expectations #42

Description

@rowanc1

Right now, the mystDirectiveError node gets created instead of the directive with a warning.

I think that we should change the logic to still create the correct token, but provide warnings. For example, adding an unknown option to a directive (e.g. with a typo), should still result in that directive node, but perhaps the mistyped option not available in the options and an error raised.

For example, this:

```{admonition} Title
:not-a-prop: value
```

Should parse to a valid admonition, node, rather than a mystDirectiveError, with a warning raised.

This is especially obvious when myst-js has a smaller implementation than a sphinx definition, the markup should parse optimistically and not error at the token phase.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions