feat(render): add auto header
This commit is contained in:
parent
fd9c3bd19d
commit
b7768b1b3c
6 changed files with 50 additions and 26 deletions
|
|
@ -67,10 +67,7 @@ renderer.code = function (code, lang = '') {
|
|||
return `<pre v-pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
|
||||
}
|
||||
renderer.link = function (href, title, text) {
|
||||
if (!/:|(\/{2})/.test(href)) {
|
||||
href = toURL(href)
|
||||
}
|
||||
return `<a href="${href}" title="${title || ''}">${text}</a>`
|
||||
return `<a href="${toURL(href)}" title="${title || text}">${text}</a>`
|
||||
}
|
||||
renderer.paragraph = function (text) {
|
||||
if (/^!>/.test(text)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue