From 426f2978cfe9e41342fd140b59ca4894c693e16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bolila?= Date: Sun, 12 Jan 2014 17:09:24 +0000 Subject: [PATCH] fixes of a newbie, me --- core/modules/parsers/wikiparser/rules/codeblock.js | 4 ++-- core/modules/widgets/codeblock.js | 2 +- editions/highlightdemo/tiddlers/HelloThere.tid | 2 +- plugins/tiddlywiki/highlight/highlightblock.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/codeblock.js b/core/modules/parsers/wikiparser/rules/codeblock.js index 9485ae7cf..b00a0bb74 100644 --- a/core/modules/parsers/wikiparser/rules/codeblock.js +++ b/core/modules/parsers/wikiparser/rules/codeblock.js @@ -49,8 +49,8 @@ exports.parse = function() { type: "element", tag: "$codeblock", attributes: { - code: {tye: "string", value: text}, - language: {tye: "string", value: this.match[1]} + code: {type: "string", value: text}, + language: {type: "string", value: this.match[1]} } }]; }; diff --git a/core/modules/widgets/codeblock.js b/core/modules/widgets/codeblock.js index e034371dc..ef54e2888 100644 --- a/core/modules/widgets/codeblock.js +++ b/core/modules/widgets/codeblock.js @@ -31,7 +31,7 @@ CodeBlockWidget.prototype.render = function(parent,nextSibling) { this.computeAttributes(); this.execute(); var codeNode = this.document.createElement("code"); - if (this.getAttribute("language")) { + if(this.getAttribute("language")) { codeNode.setAttribute("class",this.getAttribute("language")); } var domNode = this.document.createElement("pre"); diff --git a/editions/highlightdemo/tiddlers/HelloThere.tid b/editions/highlightdemo/tiddlers/HelloThere.tid index 6cfdcedda..a244a1696 100644 --- a/editions/highlightdemo/tiddlers/HelloThere.tid +++ b/editions/highlightdemo/tiddlers/HelloThere.tid @@ -10,4 +10,4 @@ To add the plugin to your own TiddlyWiki5, just drag this link to the browser wi To add your prefered [[theme|http://highlightjs.org/static/test.html]] append to your: -[[$:/boot/boot.css]] +[[$:/tags/stylesheet]] diff --git a/plugins/tiddlywiki/highlight/highlightblock.js b/plugins/tiddlywiki/highlight/highlightblock.js index 9171d466e..f672c723c 100644 --- a/plugins/tiddlywiki/highlight/highlightblock.js +++ b/plugins/tiddlywiki/highlight/highlightblock.js @@ -19,7 +19,7 @@ Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5 lang = this.domNodes[0].getElementsByTagName('code')[0].className, hljs = require("$:/plugins/tiddlywiki/highlight/highlight.js").hljs; - if ($tw.browser && lang !== 'no-highlight') { + if($tw.browser && lang !== 'no-highlight') { hljs.tabReplace = ' '; hljs.highlightBlock(this.domNodes[0]); }