executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
739 stars 196 forks source link

Unable to cross-reference targets generated by sphinx-click #513

Open paw-lu opened 2 years ago

paw-lu commented 2 years ago

Describe the bug

context I'm trying to use MyST with sphinx-click and cross-reference the targets it creates.

expectation I expect to be able to cross reference the targets in MyST like I can when writing rst.

bug But instead my markup does not generate links. Even when falling back to eval-rst.

problem This is a problem because I am unable to generate links to the generated documentation. Which is something that works when working in rst.


Thanks for sharing the work here, I've really enjoyed using MyST!

Reproduce the bug

Usage2
======

.. click
:: nbpreview.__main__:typer_click_object
   :prog: nbpreview
   :nested: full

:ref:`foo <nbpreview-paging-NBPREVIEW_PAGING>`
Screen Shot 2022-01-28 at 10 46 51 PM
# Usage2

```{eval-rst}
.. click:: nbpreview.__main__:typer_click_object
   :prog: nbpreview
   :nested: full

{ref}foo <nbpreview-paging-NBPREVIEW_PAGING>

:ref:`foo <nbpreview-paging-NBPREVIEW_PAGING>`


<img width="372" alt="Screen Shot 2022-01-28 at 10 48 55 PM" src="https://user-images.githubusercontent.com/30049606/151650930-f0d688fa-ddc7-447b-a6d4-521398003a4d.png">

### List your environment

myst-parser 0.16.1
welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: