docusaurus/packages/docusaurus-1.x/package.json
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

80 lines
2.2 KiB
JSON

{
"name": "docusaurus",
"description": "Easy to Maintain Open Source Documentation Websites",
"version": "2.0.0-alpha.24",
"license": "MIT",
"keywords": [
"documentation",
"websites",
"open source",
"docusaurus"
],
"repository": {
"type": "git",
"url": "https://github.com/facebook/Docusaurus.git"
},
"scripts": {
"start": "cd ../../website-1.x && yarn start"
},
"bin": {
"docusaurus-start": "./lib/start-server.js",
"docusaurus-build": "./lib/build-files.js",
"docusaurus-publish": "./lib/publish-gh-pages.js",
"docusaurus-examples": "./lib/copy-examples.js",
"docusaurus-write-translations": "./lib/write-translations.js",
"docusaurus-version": "./lib/version.js",
"docusaurus-rename-version": "./lib/rename-version.js"
},
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.5.5",
"@babel/traverse": "^7.5.5",
"@babel/types": "^7.5.5",
"autoprefixer": "^9.6.1",
"babylon": "^6.18.0",
"chalk": "^2.4.2",
"chokidar": "^3.0.2",
"classnames": "^2.2.6",
"color": "^2.0.1",
"commander": "^2.20.0",
"cross-spawn": "^6.0.5",
"crowdin-cli": "^0.3.0",
"cssnano": "^4.1.10",
"escape-string-regexp": "^2.0.0",
"express": "^4.17.1",
"feed": "^1.1.0",
"fs-extra": "^8.1.0",
"gaze": "^1.1.3",
"glob": "^7.1.3",
"highlight.js": "^9.15.8",
"imagemin": "^6.0.0",
"imagemin-gifsicle": "^6.0.1",
"imagemin-jpegtran": "^6.0.0",
"imagemin-optipng": "^6.0.0",
"imagemin-svgo": "^7.0.0",
"lodash": "^4.17.15",
"markdown-toc": "^1.2.0",
"mkdirp": "^0.5.1",
"portfinder": "^1.0.21",
"postcss": "^7.0.17",
"prismjs": "^1.17.1",
"react": "^16.8.4",
"react-dev-utils": "^9.0.1",
"react-dom": "^16.8.4",
"remarkable": "^1.7.4",
"request": "^2.88.0",
"shelljs": "^0.8.3",
"sitemap": "^3.2.2",
"striptags": "^3.1.1",
"tcp-port-used": "^1.0.1",
"tiny-lr": "^1.1.1",
"tree-node-cli": "^1.2.5",
"truncate-html": "^1.0.2"
}
}