summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 8fa99ce2..77f298f9 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -755,11 +755,17 @@ function highlightRender(code, lang) {
return '<div class="mermaid raw">' + code + '</div>';
}
var reallang = lang.replace(/\=$|\=\d+$|\=\+$/, '');
- var languages = hljs.listLanguages();
- if (languages.indexOf(reallang) == -1) {
- var result = hljs.highlightAuto(code);
+ if (reallang == "tiddlywiki" || reallang == "mediawiki") {
+ var result = {
+ value: Prism.highlight(code, Prism.languages.wiki)
+ };
} else {
- var result = hljs.highlight(reallang, code);
+ var languages = hljs.listLanguages();
+ if (languages.indexOf(reallang) == -1) {
+ var result = hljs.highlightAuto(code);
+ } else {
+ var result = hljs.highlight(reallang, code);
+ }
}
var showlinenumbers = /\=$|\=\d+$|\=\+$/.test(lang);
if (showlinenumbers) {