mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-07-14 00:26:52 +02:00
Generate manual overviews from github_docs
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
const md = require('markdown-it')()
|
||||
const anchor = require('markdown-it-anchor')
|
||||
|
||||
md.use(anchor, {
|
||||
level: 1,
|
||||
// slugify: string => string,
|
||||
permalink: false,
|
||||
// renderPermalink: (slug, opts, state, permalink) => {},
|
||||
permalinkClass: 'header-anchor',
|
||||
permalinkSymbol: '¶',
|
||||
permalinkBefore: false
|
||||
})
|
||||
|
||||
const src = `# First header
|
||||
|
||||
Lorem ipsum.
|
||||
|
||||
## Next section!
|
||||
|
||||
This is totaly awesome.`
|
||||
|
||||
console.log(md.render(src))
|
||||
Reference in New Issue
Block a user