web-documentation 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Marked} from 'marked'
|
|
2
|
-
import {gfmHeadingId} from 'marked-gfm-heading-id'
|
|
2
|
+
import {gfmHeadingId, getHeadingList} from 'marked-gfm-heading-id'
|
|
3
3
|
import {markedHighlight} from 'marked-highlight'
|
|
4
4
|
import highlightJSModule from 'highlight.js'
|
|
5
5
|
import {markedXhtml} from 'marked-xhtml'
|
|
@@ -24,9 +24,10 @@ const marked = new Marked(
|
|
|
24
24
|
|
|
25
25
|
export default (options) => {
|
|
26
26
|
marked.setOptions(options)
|
|
27
|
+
|
|
27
28
|
// Include an id attribute when emitting headings (h1, h2, h3, ...).
|
|
28
|
-
marked.use(
|
|
29
|
-
{prefix: 'wd-heading-'},
|
|
29
|
+
marked.use(
|
|
30
|
+
gfmHeadingId({prefix: 'wd-heading-'}),
|
|
30
31
|
{
|
|
31
32
|
hooks: {
|
|
32
33
|
// Adds an autogenerated table of contents list.
|
|
@@ -46,7 +47,7 @@ export default (options) => {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
)
|
|
50
|
+
)
|
|
50
51
|
// Favors self-closing xhtml tags.
|
|
51
52
|
marked.use(markedXhtml())
|
|
52
53
|
|