summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-23 12:37:24 +0000
committerPhil Hughes <me@iamphill.com>2017-03-23 12:37:24 +0000
commit0ef85857268f2622a3c248e39cc359ffc9193849 (patch)
tree3172e81c918a6e96ff7d3c36a12350cf90f41cda /vendor
parente8949a1ee48b5589c1f82d4b8a6b4e20d43d51a3 (diff)
downloadgitlab-ce-0ef85857268f2622a3c248e39cc359ffc9193849.tar.gz
Added tests
Diffstat (limited to 'vendor')
-rw-r--r--vendor/assets/javascripts/notebooklab.js8
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
+});