diff --git a/StaticRoot/explorer.js b/StaticRoot/explorer.js index 0cfef5f..a336e86 100644 --- a/StaticRoot/explorer.js +++ b/StaticRoot/explorer.js @@ -57,11 +57,29 @@ Vue.component('reg-attribute', { return reg[2] }, decorated: function() { - return anchorme(this.content.replace(/\n/g, "
"), { + var c = this.content + + // an attribute terminated with \n indicates a blank + // trailing line, however a single trailing
will + // not be rendered in HTML, this hack doubles up the + // trailing newline so it creates a
pair + // which renders as the blank line + if (c.substr(c.length-1) == "\n") { + c = c + "\n" + } + + // replace newlines with line breaks + c = c.replace(/\n/g, "
") + + // decorate + c = anchorme(c, { truncate: 40, ips: false, - attributes: [ { name: "target", value: "_blank" } ] + attributes: [ { name: "target", value: "_blank" } ] }) + + // and return the final decorated content + return c } } })