Replies: 2 comments 2 replies
-
Can you illustrate your words with code, so that I can better understand what you have and what happens? Yes, there are ways to ignore/exclude autolinks: https://github.com/rehypejs/rehype-autolink-headings. The test option indeed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sure. This is the heading in MDX ### [Chrome DevTools](https://github.com/ChromeDevTools/devtools-frontend) 55+, [Microsoft Edge](https://www.microsoftedgeinsider.com) And this is the HTML output <a href="#chrome-devtools-55-microsoft-edge">
<a href="https://github.com/ChromeDevTools/devtools-frontend">Chrome DevTools</a>
55+,
<a href="https://www.microsoftedgeinsider.com">Microsoft Edge</a>
</a> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The repo I'm working on has a lot of docs in MDX and uses rehype-slug and rehype-autolink-headings to add links to headings. The problem is some of the docs have headings that link to one or more external sources (These docs cannot be modified). Combined with the autolink plugin, this causes anchor tag(s) to be nested within the auto-generated anchor tag. Is there a way to ignore/exclude autolink for headings with links? Could the test option be used to handle this?
Beta Was this translation helpful? Give feedback.
All reactions