summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js5
-rw-r--r--public/js/index.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index c0b2e584..dd02c9c1 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -3,6 +3,7 @@ require('prismjs/themes/prism.css');
var Prism = require('prismjs');
require('prismjs/components/prism-wiki');
require('prismjs/components/prism-haskell');
+require('prismjs/components/prism-go');
var hljs = require('highlight.js');
var PDFObject = require('pdfobject');
var S = require('string');
@@ -474,10 +475,10 @@ function finishView(view) {
var result = {
value: code
};
- } else if (reallang == "haskell") {
+ } else if (reallang == "haskell" || reallang == "go") {
code = S(code).unescapeHTML().s;
var result = {
- value: Prism.highlight(code, Prism.languages.haskell)
+ value: Prism.highlight(code, Prism.languages[reallang])
};
} else if (reallang == "tiddlywiki" || reallang == "mediawiki") {
code = S(code).unescapeHTML().s;
diff --git a/public/js/index.js b/public/js/index.js
index 9c7ac633..f49c9da1 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -213,7 +213,7 @@ var cursorMenuThrottle = 50;
var cursorActivityDebounce = 50;
var cursorAnimatePeriod = 100;
var supportContainers = ['success', 'info', 'warning', 'danger'];
-var supportCodeModes = ['javascript', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki'];
+var supportCodeModes = ['javascript', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go'];
var supportCharts = ['sequence', 'flow', 'graphviz', 'mermaid'];
var supportHeaders = [
{