diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-23 12:37:24 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-03-23 12:37:24 +0000 |
commit | 0ef85857268f2622a3c248e39cc359ffc9193849 (patch) | |
tree | 3172e81c918a6e96ff7d3c36a12350cf90f41cda /vendor/assets | |
parent | e8949a1ee48b5589c1f82d4b8a6b4e20d43d51a3 (diff) | |
download | gitlab-ce-0ef85857268f2622a3c248e39cc359ffc9193849.tar.gz |
Added tests
Diffstat (limited to 'vendor/assets')
-rw-r--r-- | vendor/assets/javascripts/notebooklab.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/assets/javascripts/notebooklab.js b/vendor/assets/javascripts/notebooklab.js index 35e845657bd..9d2aea18c5b 100644 --- a/vendor/assets/javascripts/notebooklab.js +++ b/vendor/assets/javascripts/notebooklab.js @@ -414,13 +414,13 @@ exports.default = { }, computed: { markdown: function markdown() { - var regex = new RegExp(/^\$\$(.*)\$\$$/, 'g'); + var regex = new RegExp('^\$\$(.*)\$\$$', 'g'); var source = this.cell.source.map(function (line) { var matches = regex.exec(line.trim()); // Only render use the Katex library if it is actually loaded - if (matches && matches.length > 0 && katex) { + if (matches && matches.length > 0 && typeof katex !== 'undefined') { return katex.renderToString(matches[1]); } else { return line; @@ -3047,7 +3047,7 @@ function escape(html, encode) { } function unescape(html) { - // explicitly match decimal, hex, and named HTML entities + // explicitly match decimal, hex, and named HTML entities return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { n = n.toLowerCase(); if (n === 'colon') return ':'; @@ -3636,4 +3636,4 @@ module.exports = { /***/ }) /******/ ]); -});
\ No newline at end of file +}); |