1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Force the highlight language to lower case

This commit is contained in:
Jermolene 2014-03-02 19:42:40 +00:00
parent bd750a21e2
commit 0200bc1b4e

View File

@ -17,7 +17,7 @@ var CodeBlockWidget = require("$:/core/modules/widgets/codeblock.js").codeblock;
CodeBlockWidget.prototype.postRender = function() { CodeBlockWidget.prototype.postRender = function() {
var domNode = this.domNodes[0]; var domNode = this.domNodes[0];
if($tw.browser && this.document !== $tw.fakeDocument && this.language) { if($tw.browser && this.document !== $tw.fakeDocument && this.language) {
domNode.className = this.language; domNode.className = this.language.toLowerCase();
var hljs = require("$:/plugins/tiddlywiki/highlight/highlight.js").hljs; var hljs = require("$:/plugins/tiddlywiki/highlight/highlight.js").hljs;
hljs.tabReplace = " "; hljs.tabReplace = " ";
hljs.highlightBlock(domNode); hljs.highlightBlock(domNode);