docusaurus/packages/docusaurus-1.x/lib
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: Add --skip-next-release option to yarn build (#1292) 2019-03-29 16:17:46 +07:00
core feat(v1): strip html from TOC (#1762) 2019-09-13 14:57:22 -07:00
server fix: fix PostCSS warning on `build` command (#1664) 2019-07-15 18:08:06 +08:00
static fix: footer links margin (#1781) 2019-09-13 13:11:43 -07:00
build-files.js fix: require babel dependencies directly (#1575) 2019-06-14 12:58:46 +08:00
copy-examples.js feat: docusaurus-init without example directories (#1378) 2019-04-21 22:28:35 -07:00
publish-gh-pages.js fix: update paths for monorepo 2019-03-23 21:53:32 -07:00
rename-version.js fix: update paths for monorepo 2019-03-23 21:53:32 -07:00
start-server.js fix: require babel dependencies directly (#1575) 2019-06-14 12:58:46 +08:00
version.js fix: require babel dependencies directly (#1575) 2019-06-14 12:58:46 +08:00
write-translations.js fix: require babel dependencies directly (#1575) 2019-06-14 12:58:46 +08:00