executablebooks / sphinx-tomyst

A sphinx translator for producing myst syntax files
MIT License
5 stars 2 forks source link

Support for index directive in myst_parser #36

Open mmcky opened 4 years ago

mmcky commented 4 years ago

It looks like index directive is not supported at present in myst_parser.

Check with @chrisjsewell if this needs to be added or if it can pass through to sphinx as a sphinx node

mmcky commented 4 years ago

So looking at myst_parser test suite index directives and roles are implemented.

However I am not sure what would be compatible myst syntax to specify multiple entires such as the example in the sphinx docs

.. index::
   single: execution; context
   module: __main__
   module: sys
   triple: module; search; path

The execution context
---------------------

...

The translator currently writes:

```{index}
single: execution; context
...


which is invalid syntax as the `single:` is not parsed as an argument.

@chrisjsewell any suggestions on passing multiple arguments in `myst`?
mmcky commented 4 years ago

There is currently not syntax that works for multiple arguments. See https://github.com/executablebooks/meta/discussions/155

mmcky commented 4 years ago

I have improved compatibility with the current myst parser through #79

So the extension will write multiple arguments but currently the parser will skip them and issue a warning. I think this is a good solution for now.