From 22591456e8c8d20ac9355e3c542a307c097c5071 Mon Sep 17 00:00:00 2001 From: Dave Machado Date: Thu, 25 May 2017 11:37:33 -0400 Subject: [PATCH] Trim Markdown Go! out of Link string --- build/md2json.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/md2json.js b/build/md2json.js index 2cd73f9e..46cb5c69 100644 --- a/build/md2json.js +++ b/build/md2json.js @@ -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) {