@jx3box/jx3box-editor 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/a.js +7 -0
- package/package.json +1 -1
package/assets/js/a.js
CHANGED
|
@@ -18,11 +18,18 @@ function formatLink(str){
|
|
|
18
18
|
href = resolveImagePath(href)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
|
|
21
22
|
let skip = ''
|
|
22
23
|
if(!whiteHost.test(to.hostname)){
|
|
23
24
|
skip = 'target="_blank"'
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
// markdown中的锚点跳转
|
|
28
|
+
let isHashAnchor = href.startsWith('#')
|
|
29
|
+
if(isHashAnchor){
|
|
30
|
+
skip = 'target="_self"'
|
|
31
|
+
}
|
|
32
|
+
|
|
26
33
|
let suffix = item[3]
|
|
27
34
|
let text = item[4]
|
|
28
35
|
|