Dimitry e0563dca43
V2.0.0 (#66)
* Add `html-parser-api` and `html-parser-impl` modules
* Add `HtmlEmptyTagReplacement`
* Implement Appendable and CharSequence in SpannableBuilder
* Renamed library modules to reflect maven artifact names
* Rename `markwon-syntax` to `markwon-syntax-highlight`
* Add HtmlRenderer asbtraction
* Add CssInlineStyleParser
* Fix Theme#listItemColor and OL
* Fix task list block parser to revert parsing state when line is not matching
* Defined test format files
* image-loader add datauri parser
* image-loader add support for inline data uri image references
* Add travis configuration
* Fix image with width greater than canvas scaled
* Fix blockquote span
* Dealing with white spaces at the end of a document
* image-loader add SchemeHandler abstraction
* Add sample-latex-math module
2018-09-17 13:15:58 +03:00

57 lines
1.5 KiB
Vue

<template>
<a :href="linkHref()" target="_blank" rel="noopener noreferrer">{{linkText()}}<OutboundLink/></a>
</template>
<script>
var map = {
"commonmark-spec": {
displayName: "commonmark spec",
href: "https://spec.commonmark.org/0.28/"
},
"commonmark-spec#inline": {
href: "https://spec.commonmark.org/0.28/#raw-html"
},
"commonmark-spec#block": {
href: "https://spec.commonmark.org/0.28/#html-blocks"
},
"commonmark-spec#soft-break": {
href: "https://spec.commonmark.org/0.28/#soft-line-breaks"
},
"commonmark-dingus": {
displayName: "commonmark dingus",
href: "https://spec.commonmark.org/dingus/"
},
"html-inlines": {
href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements"
},
"html-blocks": {
href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements"
},
"jsoup": {
displayName: "Jsoup",
href: "https://github.com/jhy/jsoup/"
},
"markwon-jsoup": {
href: "https://github.com/noties/Markwon/tree/master/markwon-html-parser-impl/src/main/java/ru/noties/markwon/html/impl/jsoup"
},
"commonmark-java": {
href: "https://github.com/atlassian/commonmark-java/",
displayName: "commonmark-java"
}
};
export default {
name: "Link",
props: ["name", "displayName", "href"],
methods: {
linkHref: function() {
return this.href || map[this.name].href;
},
linkText: function() {
return this.displayName || map[this.name].displayName;
}
}
};
</script>