Skip to content

Commit 66d7919

Browse files
committed
Fix href type, fixed #46
1 parent 580767b commit 66d7919

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Bug fixes
44
- Fix toggle button style.
5+
- Support `mailto`, `tel`, etc. href type
56

67

78
## 1.4.2

Diff for: src/render.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ renderer.code = function (code, lang = '') {
4040
return `<pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
4141
}
4242
renderer.link = function (href, title, text) {
43-
if (OPTIONS.router && !/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(href)) {
43+
if (OPTIONS.router && !/:/.test(href)) {
4444
href = `#/${href}`.replace(/\/\//g, '/')
4545
}
4646

0 commit comments

Comments
 (0)