diff --git a/docs/api-doc-markdown.md b/docs/api-doc-markdown.md
index e2e43d6fe8..da75b3be2f 100644
--- a/docs/api-doc-markdown.md
+++ b/docs/api-doc-markdown.md
@@ -5,7 +5,7 @@ title: Markdown Features
## Markdown Headers
-## Documents
+### Documents
Documents use the following markdown header fields that are enclosed by a line `---` on either side:
@@ -38,7 +38,7 @@ original_id: doc1
---
```
-## Blog Posts
+### Blog Posts
Blog Posts use the following markdown header fields that are enclosed by a line `---` on either side:
@@ -65,7 +65,7 @@ authorFBID: 100002976521003
Docusaurus supports some extra features when writing documentation in markdown.
-## Linking other Documents
+### Linking other Documents
You can use relative urls to other documentation files which will automatically get converted to the corresponding html links when they get rendered.
@@ -78,7 +78,7 @@ This markdown will automatically get converted into a link to `/docs/other-docum
This can help when you want to navigate through docs on GitHub since the links there will be functional links to other documents (still on GitHub), but the documents will have the correct html links when they get rendered.
-## Linking to Images and Other Assets
+### Linking to Images and Other Assets
Static assets can be linked to in the same way that documents are, using relative urls. Static assets used in documents and blogs should go into `docs/assets` and `website/blog/assets`, respectively. The markdown will get converted into correct link paths so that these paths will work for documents of all languages and versions.
@@ -89,7 +89,7 @@ Example:
```
-## Generating Table of Contents
+### Generating Table of Contents
You can make an autogenerated list of links, which can be useful as a table of contents for API docs.
diff --git a/lib/core/Remarkable.js b/lib/core/Remarkable.js
index c09e3de656..92a8a950e0 100644
--- a/lib/core/Remarkable.js
+++ b/lib/core/Remarkable.js
@@ -12,10 +12,8 @@ const CWD = process.cwd();
*/
function anchors(md) {
md.renderer.rules.heading_open = function(tokens, idx /*, options, env */) {
- return '' + '';
- };
- md.renderer.rules.heading_close = function(tokens, idx /*, options, env */) {
- return ' #' + '\n';
+ const textToken = tokens[idx+1];
+ return '';
};
}
@@ -75,7 +73,6 @@ class Remarkable extends React.Component {
}
}
-
const html = this.md.render(source);
// Ensure fenced code blocks use Highlight.js hljs class
diff --git a/lib/core/Site.js b/lib/core/Site.js
index 4401387f9a..0d1671032b 100644
--- a/lib/core/Site.js
+++ b/lib/core/Site.js
@@ -128,7 +128,7 @@ class Site extends React.Component {
}}
/>
))}
-
+