Skip to content

Commit 02ee3c2

Browse files
committed
linck #9 fix markdown-it-link-attributes options
1 parent 7d04d57 commit 02ee3c2

File tree

6 files changed

+2567
-2627
lines changed

6 files changed

+2567
-2627
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ options: {
6868
linkify: true
6969
},
7070
linkAttributes: {
71-
target: '_blank',
72-
rel: 'noopener'
71+
attrs: {
72+
target: '_blank',
73+
rel: 'noopener'
74+
}
7375
}
7476
}
7577
```

README_CN.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ options: {
7272
linkify: true
7373
},
7474
linkAttributes: {
75-
target: '_blank',
76-
rel: 'noopener'
75+
attrs: {
76+
target: '_blank',
77+
rel: 'noopener'
78+
}
7779
}
7880
}
7981
```

example/components/example.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ export default {
2020
linkify: true
2121
},
2222
linkAttributes: {
23-
target: '_blank',
24-
rel: 'noopener'
23+
attrs: {
24+
target: '_self',
25+
rel: 'noopener'
26+
}
2527
}
2628
}
2729
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markdown-it-vue",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"private": false,
55
"description": "The vue lib for markdown-it",
66
"author": {
@@ -28,10 +28,10 @@
2828
},
2929
"main": "dist/markdown-it-vue.umd.min.js",
3030
"dependencies": {
31-
"echarts": "^4.1.0",
31+
"echarts": "^4.3.0",
3232
"flowchart.js": "^1.12.0",
3333
"github-markdown-css": "^3.0.1",
34-
"markdown-it": "^8.4.2",
34+
"markdown-it": "^10.0.0",
3535
"markdown-it-abbr": "^1.0.4",
3636
"markdown-it-container": "^2.0.0",
3737
"markdown-it-deflist": "^2.0.3",
@@ -40,24 +40,24 @@
4040
"markdown-it-github-toc": "^3.2.4",
4141
"markdown-it-highlight": "^0.2.0",
4242
"markdown-it-icons": "^0.4.1",
43-
"markdown-it-ins": "^2.0.0",
43+
"markdown-it-ins": "^3.0.0",
4444
"markdown-it-katex": "^2.0.3",
4545
"markdown-it-latex": "^0.2.0",
46-
"markdown-it-mark": "^2.0.0",
46+
"markdown-it-mark": "^3.0.0",
4747
"markdown-it-source-map": "^0.1.1",
4848
"markdown-it-sub": "^1.0.0",
4949
"markdown-it-sup": "^1.0.0",
5050
"markdown-it-task-lists": "^2.1.1",
5151
"markdown-it-toc-and-anchor": "^4.1.2",
52-
"mermaid": "^8.0.0-rc.8",
52+
"mermaid": "^8.3.0",
5353
"vue": "^2.6.6"
5454
},
5555
"devDependencies": {
5656
"@vue/cli-plugin-babel": "^3.8.0",
5757
"@vue/cli-plugin-eslint": "^3.8.0",
5858
"@vue/cli-service": "^3.8.0",
5959
"babel-eslint": "^10.0.1",
60-
"eslint": "^5.16.0",
60+
"eslint": "^6.4.0",
6161
"eslint-plugin-vue": "^5.0.0",
6262
"vue-cli-plugin-component-lib": "^0.1.6",
6363
"vue-template-compiler": "^2.5.21"

src/markdown-it-vue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default {
111111
},
112112
data() {
113113
const optMarkdownIt = this.options.markdownIt
114-
const linkAttributes = this.options.linkAttributes = DEFAULT_OPTIONS_LINK_ATTRIBUTES
114+
const linkAttributes = this.options.linkAttributes || DEFAULT_OPTIONS_LINK_ATTRIBUTES
115115
const optKatex = this.options.katex || DEFAULT_OPTIONS_KATEX
116116
const optTasklists = this.options.tasklists || DEFAULT_OPTIONS_TASKLISTS
117117
const optIcons = this.options.icons || DEFAULT_OPTIONS_ICONS

0 commit comments

Comments
 (0)