docusaurus/packages
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
..
docusaurus fix(v2): do not escape html and body attributes (#1747) 2019-08-07 15:56:31 +07:00
docusaurus-1.x feat(v1): strip html from TOC (#1762) 2019-09-13 14:57:22 -07:00
docusaurus-init chore: upgrade deps (#1733) 2019-08-01 19:14:12 +07:00
docusaurus-init-1.x v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-mdx-loader chore: upgrade deps (#1733) 2019-08-01 19:14:12 +07:00
docusaurus-plugin-content-blog chore: upgrade deps (#1733) 2019-08-01 19:14:12 +07:00
docusaurus-plugin-content-docs-legacy v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-plugin-content-pages v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-plugin-google-analytics v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-plugin-google-gtag v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-plugin-ideal-image v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-plugin-sitemap v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-preset-classic v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-theme-classic feat(v2): blog tags support cjk (#1701) 2019-09-13 14:16:11 -07:00
docusaurus-theme-live-codeblock v2.0.0-alpha.24 2019-07-24 15:55:28 +07:00
docusaurus-theme-search-algolia fix(v2): responsive search bar (#1741) 2019-08-06 11:49:28 +07:00
docusaurus-utils chore: upgrade deps (#1733) 2019-08-01 19:14:12 +07:00