Commit c564c898 by Johannes Edmeier

Update to linkifyjs 2.1.2

Updated linkifyjs to 2.1.2 which treats single quotes as punctuation and now renders the detected links in the yml nicely.
parent cf822d97
......@@ -22,13 +22,6 @@ module.exports = function () {
var max = maxLength || Number.MAX_VALUE;
return linkify(input, {
target: '_blank',
formatHref: function (href, type) {
if (type === 'url') {
//the yaml filter quotes all strings with singlequotes which then shows up in the href so we remove them here
return href.replace(/'$/, '');
}
return href;
},
format: function(url, type) {
if (type === 'url' && url.length > max) {
url = url.replace(/https?:\/\//, '');
......
......@@ -18,7 +18,7 @@
"font-awesome": "^4.6.3",
"jquery": "^2.2.4",
"js-yaml": "^3.6.1",
"linkifyjs": "^2.0.3"
"linkifyjs": "^2.1.2"
},
"devDependencies": {
"clean-webpack-plugin": "^0.1.10",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment