diff options
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/extra.js | 6 | ||||
-rw-r--r-- | public/js/index.js | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 05d00780..36d0e676 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -2,6 +2,7 @@ require('prismjs/themes/prism.css'); var Prism = require('prismjs'); require('prismjs/components/prism-wiki'); +require('prismjs/components/prism-haskell'); var hljs = require('highlight.js'); var PDFObject = require('pdfobject'); var S = require('string'); @@ -484,6 +485,11 @@ function finishView(view) { var result = { value: code }; + } else if (reallang == "haskell") { + code = S(code).unescapeHTML().s; + var result = { + value: Prism.highlight(code, Prism.languages.haskell) + }; } else if (reallang == "tiddlywiki" || reallang == "mediawiki") { code = S(code).unescapeHTML().s; var result = { diff --git a/public/js/index.js b/public/js/index.js index 35f63839..9c7ac633 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', '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']; var supportCharts = ['sequence', 'flow', 'graphviz', 'mermaid']; var supportHeaders = [ { |