mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 00:56:51 +00:00
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:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user