fixes of a newbie, me

print-window-tiddler
João Bolila 2014-01-12 17:09:24 +00:00
rodzic c5035fc0b0
commit 426f2978cf
4 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -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]}
}
}];
};

Wyświetl plik

@ -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");

Wyświetl plik

@ -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]]

Wyświetl plik

@ -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]);
}