Turn the TiddlyWiki 2.x.x parser into a plugin

print-window-tiddler
Jeremy Ruston 2012-11-15 12:47:09 +00:00
rodzic 26822121be
commit 5f9b2e9d84
4 zmienionych plików z 12 dodań i 4 usunięć

Wyświetl plik

@ -0,0 +1,7 @@
{
"title": "$:/plugins/tiddlywiki/tw2parser",
"description": "A parser for TiddlyWiki 2.x.x style wikitext",
"author": "JeremyRuston",
"version": "0.0.0",
"coreVersion": ">=5.0.0"
}

Wyświetl plik

@ -1,5 +1,5 @@
/*\ /*\
title: $:/core/modules/parsers/wikitextparser/wikitextparser.js title: $:/plugins/tiddlywiki/tw2parser/wikitextparser.js
type: application/javascript type: application/javascript
module-type: parser module-type: parser
@ -54,7 +54,7 @@ var WikiTextParser = function(options) {
}; };
WikiTextParser.prototype.installRules = function() { WikiTextParser.prototype.installRules = function() {
var rules = require("./rules/wikitextrules.js").rules, var rules = require("./wikitextrules.js").rules,
pattern = []; pattern = [];
for(var n=0; n<rules.length; n++) { for(var n=0; n<rules.length; n++) {
pattern.push("(" + rules[n].match + ")"); pattern.push("(" + rules[n].match + ")");

Wyświetl plik

@ -1,5 +1,5 @@
/*\ /*\
title: $:/core/modules/parsers/wikitextparser/rules/wikitextrules.js title: $:/plugins/tiddlywiki/tw2parser/wikitextrules.js
type: application/javascript type: application/javascript
module-type: module module-type: module

Wyświetl plik

@ -1,5 +1,6 @@
{ {
"plugins": [ "plugins": [
"tiddlywiki/fullscreen" "tiddlywiki/fullscreen",
"tiddlywiki/tw2parser"
] ]
} }