admin管理员组文章数量:1123153
In details section, for example -
<details>
<summary>Some title</summary>
Some text with [link](url)
</details>
the text [link](url)
won't convert to an URL, it stays unparsed. The same text outside details
works fine.
Is it some markdown restriction ? How to put links to details then ?
In details section, for example -
<details>
<summary>Some title</summary>
Some text with [link](url)
</details>
the text [link](url)
won't convert to an URL, it stays unparsed. The same text outside details
works fine.
Is it some markdown restriction ? How to put links to details then ?
Share Improve this question asked 5 hours ago Юрий ГерасимовЮрий Герасимов 1 New contributor Юрий Герасимов is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 0Markdown handling of this scenario varies widely by implementation. But Docusaurus uses CommonMark for markdown.
CommonMark in turn has extensive documentation on their handling of HTML blocks which is what you're using to embed HTML directly into the Markdown file.
Boiling that all down, you can solve this in two distinct ways, shown below.
Use two html blocks with markdown in between
CommonMark (somewhat surprisingly) allows unbalanced HTML blocks. So you can use a block to start your HTML, some markdown in the middle, and a block to end it. HTML blocks are separated from Markdown blocks by a single blank line, like this:
<details>
<summary>Some title</summary>
Some text with [link](url)
</details>
Note: This will create a paragraph
<p>
around your text which may not be what you want depending on your situation.
Use HTML
If you want tighter control over the produced HTML you can just do the link in the HTML directly.
<details>
<summary>Some title</summary>
Some text with <a href="url">link</a>
</details>
本文标签: In Docusaurus markdown link inside details won39t parseStack Overflow
版权声明:本文标题:In Docusaurus markdown link inside details won't parse - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736550325a1944502.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论