Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reStructuredText reader doesn't support nested internal hyperlink targets #9607

Open
haxtibal opened this issue Mar 26, 2024 · 0 comments
Open
Labels

Comments

@haxtibal
Copy link

docutils allows to target individual list items by nesting internal hyperlink targets at the end of indented text blocks.

pandoc doesn't support it

$ pandoc -v | head -n 1
pandoc 2.9.2.1
$ echo '
* bullet list

  .. _`second item`:

* second item, with hyperlink target.

Jump to `second item`_.' | pandoc -f rst > /dev/null
[WARNING] Reference not found for 'second item' at line 8 column 23

Note that the following works (internal target not nested)

* bullet list

.. _`second item`:

* second item, with hyperlink target.

but isn't exactly the same. Here pandoc creates two distinct tables in the AST, the second one wrapped in a Div. As a workaround I'm currently using Lua filters to detect such split tables and merge them by AST transformations.

@haxtibal haxtibal added the bug label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant