From 8d95c54bb7b4f6451ee93cf4427f66d43cae4f66 Mon Sep 17 00:00:00 2001 From: endiliey Date: Wed, 15 May 2019 00:40:42 +0800 Subject: [PATCH 1/2] fix: right TOC should not strip special chars --- docs/api-commands.md | 3 +++ packages/docusaurus-1.x/lib/core/toc.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/api-commands.md b/docs/api-commands.md index 1468d8d92d2b..e235b3508255 100644 --- a/docs/api-commands.md +++ b/docs/api-commands.md @@ -22,6 +22,9 @@ The same script can be invoked using npm: npm run start ``` + +### `//status` + To run a particular script, just replace the `start` command in the examples above with the command associated with your script. ## Using arguments diff --git a/packages/docusaurus-1.x/lib/core/toc.js b/packages/docusaurus-1.x/lib/core/toc.js index 9ee9a704575a..d413367d5f99 100644 --- a/packages/docusaurus-1.x/lib/core/toc.js +++ b/packages/docusaurus-1.x/lib/core/toc.js @@ -38,7 +38,7 @@ function getTOC(content, headingTags = 'h2', subHeadingTags = 'h3') { if (!allowedHeadingLevels.includes(heading.lvl)) { return; } - const rawContent = mdToc.titleize(heading.content); + const rawContent = heading.content; const entry = { hashLink, rawContent, From ec5d44070d4f1bc8e9088cc8010aeeb813962faa Mon Sep 17 00:00:00 2001 From: endiliey Date: Wed, 15 May 2019 00:42:17 +0800 Subject: [PATCH 2/2] nits --- docs/api-commands.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/api-commands.md b/docs/api-commands.md index e235b3508255..1468d8d92d2b 100644 --- a/docs/api-commands.md +++ b/docs/api-commands.md @@ -22,9 +22,6 @@ The same script can be invoked using npm: npm run start ``` - -### `//status` - To run a particular script, just replace the `start` command in the examples above with the command associated with your script. ## Using arguments