mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
The approach here is to first strip the HTML from the heading's content, then rendered it with markdown to get the HTML content for the TOC entry, then to strip the HTML from the rendered content again, as to get the text for the TOC entry's link. Adds an additional dependency of striptags (MIT licensed) Example TOC Entry, given the heading of: ```markdown ``` ```javascript { hashLink: 'foo', rawContent: '<a name="foo"></a> _Foo_', content: '<em>Foo</em>', children: [] } ``` Previously this TOC entry would be: ```javascript { hashLink: 'a-name-foo-a-_foo_', rawContent: '<a name="foo"></a> _Foo_', content: '<a name="foo"></a> <em>Foo</em>', children: [] } ``` closes issue #1703 |
||
---|---|---|
.. | ||
__tests__ | ||
nav | ||
anchors.js | ||
BlogPageLayout.js | ||
BlogPost.js | ||
BlogPostLayout.js | ||
BlogSidebar.js | ||
CodeTabsMarkdownBlock.js | ||
CompLibrary.js | ||
Container.js | ||
Doc.js | ||
DocsLayout.js | ||
DocsSidebar.js | ||
GridBlock.js | ||
Head.js | ||
MarkdownBlock.js | ||
Redirect.js | ||
Remarkable.js | ||
renderMarkdown.js | ||
Site.js | ||
toc.js | ||
toSlug.js | ||
unindent.js | ||
utils.js |