Trim Markdown Go! out of Link string

This commit is contained in:
Dave Machado 2017-05-25 11:37:33 -04:00
parent 264917a905
commit 22591456e8

View file

@ -1,7 +1,11 @@
fs = require('fs')
function md_trim(str) {
return str.replace(/(^\s+)|(\s+$)/g, "");
str = str.replace(/(^\s+)|(\s+$)/g, "");
if (str.lastIndexOf("[Go!]", 0) === 0) {
str = str.replace("[Go!]", "").slice(1, -1);
}
return str;
}
function handle(filename, anchor) {