question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MyST links to anchor links

See original GitHub issue

Describe the bug

Anchor links don’t work.

[Signal](../api/signal) compiles in Sphinx but does not have an anchor link.

[Signal](../api/signal#torchsynth.signal.Signal) does not generate a link: “WARNING: ‘myst’ reference target not found: …/api/signal#torchsynth.signal.Signal”

```{eval-rst}
(:class:`~torchsynth.module.VCO`)`
```

works but creates a new paragraph

To Reproduce

Try to link to a particular anchor location in a particular file, e.g. above.

Expected behavior

There should be a way to link to MyST link to anchor locations OR an eval-rst that doesn’t create a new paragraph.

Environment

  • Python Version [e.g. 3.7.1]: 3.8.5
  • Package versions or output of jupyter-book --version: 0.13.5 + Sphinx
  • Operating System: OSX

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Apr 25, 2021

Good to hear 😄 The role syntax is detailed here: https://myst-parser.readthedocs.io/en/latest/using/syntax.html#roles-an-in-line-extension-point, but any feedback on improving this is welcome

(on a related note, I’m also finishing up https://github.com/executablebooks/rst-to-myst)

0reactions
turiancommented, Apr 25, 2021

Wow! @chrisjsewell thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Myst handles HTML anchors in headings in an unexpected way
This is a problem because it breaks all links and spams lots of warnings during sphinx-build. Reproduce the bug. Download the ...
Read more >
Syntax Extensions - MyST-Parser
The MyST Parser can automatically generate label “slugs” for header anchors so that you can reference them from markdown links.
Read more >
MyST syntax cheat sheet - Jupyter Book
MyST syntax cheat sheet# · Headers# · Target headers# · Quote# · Thematic break# · Line comment# · Block break# · HTML block#...
Read more >
Sphinx Docs - Linking to Specific Section of Another ...
Currently markdown links to other MD docs are working fine (and same with ... as the html is rendered with an anchor to...
Read more >
Markdown and ReST — Sphinx-lesson documentation
sphinx-lesson uses the MyST-parser (markedly structured text), which is both ... :doc:`link to page <page-filename>` :ref:`page anchor link <ref-name>` ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found