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

This commit is contained in:
Jeremy Ruston 2012-11-15 12:47:09 +00:00
parent 26822121be
commit 5f9b2e9d84
4 changed files with 12 additions and 4 deletions

View File

@ -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"
}

View File

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

View File

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

View File

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