Skip to content

Commit

Permalink
linck #9 fix markdown-it-link-attributes options
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenq committed Sep 19, 2019
1 parent 7d04d57 commit 02ee3c2
Show file tree
Hide file tree
Showing 6 changed files with 2,567 additions and 2,627 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ options: {
linkify: true
},
linkAttributes: {
target: '_blank',
rel: 'noopener'
attrs: {
target: '_blank',
rel: 'noopener'
}
}
}
```
Expand Down
6 changes: 4 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ options: {
linkify: true
},
linkAttributes: {
target: '_blank',
rel: 'noopener'
attrs: {
target: '_blank',
rel: 'noopener'
}
}
}
```
Expand Down
6 changes: 4 additions & 2 deletions example/components/example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ export default {
linkify: true
},
linkAttributes: {
target: '_blank',
rel: 'noopener'
attrs: {
target: '_self',
rel: 'noopener'
}
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-it-vue",
"version": "1.0.9",
"version": "1.0.10",
"private": false,
"description": "The vue lib for markdown-it",
"author": {
Expand Down Expand Up @@ -28,10 +28,10 @@
},
"main": "dist/markdown-it-vue.umd.min.js",
"dependencies": {
"echarts": "^4.1.0",
"echarts": "^4.3.0",
"flowchart.js": "^1.12.0",
"github-markdown-css": "^3.0.1",
"markdown-it": "^8.4.2",
"markdown-it": "^10.0.0",
"markdown-it-abbr": "^1.0.4",
"markdown-it-container": "^2.0.0",
"markdown-it-deflist": "^2.0.3",
Expand All @@ -40,24 +40,24 @@
"markdown-it-github-toc": "^3.2.4",
"markdown-it-highlight": "^0.2.0",
"markdown-it-icons": "^0.4.1",
"markdown-it-ins": "^2.0.0",
"markdown-it-ins": "^3.0.0",
"markdown-it-katex": "^2.0.3",
"markdown-it-latex": "^0.2.0",
"markdown-it-mark": "^2.0.0",
"markdown-it-mark": "^3.0.0",
"markdown-it-source-map": "^0.1.1",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-task-lists": "^2.1.1",
"markdown-it-toc-and-anchor": "^4.1.2",
"mermaid": "^8.0.0-rc.8",
"mermaid": "^8.3.0",
"vue": "^2.6.6"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint": "^6.4.0",
"eslint-plugin-vue": "^5.0.0",
"vue-cli-plugin-component-lib": "^0.1.6",
"vue-template-compiler": "^2.5.21"
Expand Down
2 changes: 1 addition & 1 deletion src/markdown-it-vue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default {
},
data() {
const optMarkdownIt = this.options.markdownIt
const linkAttributes = this.options.linkAttributes = DEFAULT_OPTIONS_LINK_ATTRIBUTES
const linkAttributes = this.options.linkAttributes || DEFAULT_OPTIONS_LINK_ATTRIBUTES
const optKatex = this.options.katex || DEFAULT_OPTIONS_KATEX
const optTasklists = this.options.tasklists || DEFAULT_OPTIONS_TASKLISTS
const optIcons = this.options.icons || DEFAULT_OPTIONS_ICONS
Expand Down
Loading

0 comments on commit 02ee3c2

Please sign in to comment.