docusaurus/packages/docusaurus-1.x/lib/core
Emelia Smith 250a818e7f feat(v1): strip html from TOC (#1762)
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: '&lt;a name=&quot;foo&quot;&gt;&lt;/a&gt; <em>Foo</em>',
  children: []
}
```

closes issue #1703
2019-09-13 14:57:22 -07:00
..
__tests__ feat(v1): strip html from TOC (#1762) 2019-09-13 14:57:22 -07:00
nav fix: don't collapse the blog navigation even if collapsible is true (#1519) 2019-05-26 20:37:58 -07:00
anchors.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
BlogPageLayout.js feat: make blog posts unlisted only in production 2019-06-15 10:32:43 -07:00
BlogPost.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
BlogPostLayout.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
BlogSidebar.js feat: make blog posts unlisted only in production 2019-06-15 10:32:43 -07:00
CodeTabsMarkdownBlock.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
CompLibrary.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
Container.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
Doc.js refactor: refactor code tab split (#1369) 2019-05-01 20:57:13 -07:00
DocsLayout.js fix: dont render html for meta description (#1672) 2019-07-18 18:20:04 +07:00
DocsSidebar.js fix: remove the Container component from the docsNavContainer (#1599) 2019-06-13 09:05:41 -07:00
GridBlock.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
Head.js feat: highlight nav item in onPageNav ToC (#1524) 2019-05-30 08:54:47 -07:00
MarkdownBlock.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
Redirect.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
Remarkable.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
renderMarkdown.js fix: replace use of deepmerge with _.merge (#1430) 2019-05-02 22:00:28 +07:00
Site.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
toc.js feat(v1): strip html from TOC (#1762) 2019-09-13 14:57:22 -07:00
toSlug.js fix: replace apostrophe with empty string in header slugification (#1618) 2019-06-21 17:40:04 -07:00
unindent.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
utils.js chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00