mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-01-12 22:46:48 +08:00
Fixed render link
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
*.log
|
||||
node_modules
|
||||
yarn.lock
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
## 1.3.2
|
||||
|
||||
### Bug fixes
|
||||
- Fixed render link
|
||||
|
||||
## 1.3.1
|
||||
|
||||
### Bug fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# docsify <small>1.3.1</small>
|
||||
# docsify <small>1.3.2</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
|
||||
@@ -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>`
|
||||
|
||||
Reference in New Issue
Block a user