Commit 38ea660 1 parent 9e81a59 commit 38ea660 Copy full SHA for 38ea660
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export function init () {
43
43
return `<pre v-pre data-lang="${ lang } "><code class="lang-${ lang } ">${ hl } </code></pre>`
44
44
}
45
45
renderer . link = function ( href , title , text ) {
46
- if ( ! / : / . test ( href ) ) {
46
+ if ( ! / [: | \/ + ] / . test ( href ) ) {
47
47
href = `#/${ href } ` . replace ( / \/ + / g, '/' )
48
48
}
49
49
@@ -58,7 +58,7 @@ export function init () {
58
58
return `<p>${ text } </p>`
59
59
}
60
60
renderer . image = function ( href , title , text ) {
61
- const url = / : / . test ( href ) ? href : ( $docsify . basePath + href ) . replace ( / \/ + / g, '/' )
61
+ const url = / [: | \/ + ] / . test ( href ) ? href : ( $docsify . basePath + href ) . replace ( / \/ + / g, '/' )
62
62
const titleHTML = title ? ` title="${ title } "` : ''
63
63
64
64
return `<img src="${ url } " alt="${ text } "${ titleHTML } />`
You can’t perform that action at this time.
0 commit comments