mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-15 08:16:14 +10:00
Fix href type, fixed #46
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ renderer.code = function (code, lang = '') {
|
||||
return `<pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
|
||||
}
|
||||
renderer.link = function (href, title, text) {
|
||||
if (OPTIONS.router && !/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(href)) {
|
||||
if (OPTIONS.router && !/:/.test(href)) {
|
||||
href = `#/${href}`.replace(/\/\//g, '/')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user