Experimental support for client-side builds

These changes allow tiddlywiki.js to cook it's own components into a
skeletal new-school client-side TiddlyWiki.
This commit is contained in:
Jeremy Ruston
2011-12-13 12:30:09 +00:00
parent f112048682
commit 8ed8772b82
22 changed files with 468 additions and 51 deletions

View File

@@ -1,3 +1,7 @@
/*\
title: js/WikiTextProcessor.js
\*/
(function(){
/*jslint node: true */
@@ -8,7 +12,11 @@ var WikiTextRules = require("./WikiTextRules.js"),
/*
Creates a new instance of the wiki text processor with the specified options. The
options are a hashmap of optional members as follows:
options are a hashmap of mandatory members as follows:
textProcessors: The TextProcessors object to use to parse any cascaded content (eg transclusion)
Planned:
enableRules: An array of names of wiki text rules to enable. If not specified, all rules are available
extraRules: An array of additional rule handlers to add
@@ -16,6 +24,7 @@ options are a hashmap of optional members as follows:
extraMacros: An array of additional macro handlers to add
*/
var WikiTextProcessor = function(options) {
this.textProcessors = options.textProcessors;
this.rules = WikiTextRules.rules;
var pattern = [];
for(var n=0; n<this.rules.length; n++) {