Fixed render link
This commit is contained in:
parent
4c8c0349e6
commit
64309beee9
4 changed files with 8 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ renderer.code = function (code, lang = '') {
|
|||
}
|
||||
renderer.link = function (href, title, text) {
|
||||
if (OPTIONS.router && !/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(href)) {
|
||||
href = !/^\/#/.test(href) ? `#/${getRoute()}${href}` : href
|
||||
href = `#/${href}`.replace(/\/\//g, '/')
|
||||
}
|
||||
|
||||
return `<a href="${href}" title="${title || ''}">${text}</a>`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue