diff options
-rw-r--r-- | src/dumbymap.mjs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index bb98cea..3d2cc0c 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -2,8 +2,6 @@ import MarkdownIt from 'markdown-it' | |||
2 | import MarkdownItAnchor from 'markdown-it-anchor' | 2 | import MarkdownItAnchor from 'markdown-it-anchor' |
3 | import MarkdownItFootnote from 'markdown-it-footnote' | 3 | import MarkdownItFootnote from 'markdown-it-footnote' |
4 | import MarkdownItFrontMatter from 'markdown-it-front-matter' | 4 | import MarkdownItFrontMatter from 'markdown-it-front-matter' |
5 | import MarkdownItTocDoneRight from 'markdown-it-toc-done-right' | ||
6 | import LeaderLine from 'leader-line' | ||
7 | import { renderWith, defaultAliases, parseConfigsFromYaml } from 'mapclay' | 5 | import { renderWith, defaultAliases, parseConfigsFromYaml } from 'mapclay' |
8 | import { onRemove, animateRectTransition, throttle, shiftByWindow } from './utils' | 6 | import { onRemove, animateRectTransition, throttle, shiftByWindow } from './utils' |
9 | import { Layout, SideBySide, Overlay } from './Layout' | 7 | import { Layout, SideBySide, Overlay } from './Layout' |
@@ -47,7 +45,6 @@ export const markdown2HTML = (container, mdContent) => { | |||
47 | }) | 45 | }) |
48 | .use(MarkdownItFootnote) | 46 | .use(MarkdownItFootnote) |
49 | .use(MarkdownItFrontMatter) | 47 | .use(MarkdownItFrontMatter) |
50 | .use(MarkdownItTocDoneRight) | ||
51 | 48 | ||
52 | // Create links with geo scheme | 49 | // Create links with geo scheme |
53 | const coordinateRegex = /^(\D*)(-?\d+\.?\d*)\s*([,\x2F\uFF0C])\s*(-?\d+\.?\d*)/g | 50 | const coordinateRegex = /^(\D*)(-?\d+\.?\d*)\s*([,\x2F\uFF0C])\s*(-?\d+\.?\d*)/g |
@@ -90,8 +87,7 @@ export const markdown2HTML = (container, mdContent) => { | |||
90 | state.tokens.push(new state.Token('dumby_block_close', '', -1)) | 87 | state.tokens.push(new state.Token('dumby_block_close', '', -1)) |
91 | }) | 88 | }) |
92 | 89 | ||
93 | const contentWithToc = '${toc}\n\n\n' + mdContent | 90 | htmlHolder.innerHTML = md.render(mdContent) |
94 | htmlHolder.innerHTML = md.render(contentWithToc) | ||
95 | 91 | ||
96 | // TODO Do this in markdown-it | 92 | // TODO Do this in markdown-it |
97 | const blocks = htmlHolder.querySelectorAll(':scope > div:not(:has(nav))') | 93 | const blocks = htmlHolder.querySelectorAll(':scope > div:not(:has(nav))') |