From d28ee0b82aba5fbe20fa70c036ddbde129f29253 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 16 Jan 2013 13:56:11 +0000 Subject: [PATCH] Change module type for parsers to "parser" --- core/modules/parsers/imageparser.js | 2 +- core/modules/parsers/textparser.js | 2 +- core/modules/parsers/wikiparser/wikiparser.js | 2 +- core/modules/wiki.js | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index a82d58de3..38296ec28 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/parsers/imageparser.js type: application/javascript -module-type: newparser +module-type: parser The image parser parses an image into an embeddable HTML element diff --git a/core/modules/parsers/textparser.js b/core/modules/parsers/textparser.js index 3179cc406..afe85507a 100644 --- a/core/modules/parsers/textparser.js +++ b/core/modules/parsers/textparser.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/parsers/textparser.js type: application/javascript -module-type: newparser +module-type: parser The plain text parser processes blocks of source text into a degenerate parse tree consisting of a single text node diff --git a/core/modules/parsers/wikiparser/wikiparser.js b/core/modules/parsers/wikiparser/wikiparser.js index 539c4f840..16ef9028e 100644 --- a/core/modules/parsers/wikiparser/wikiparser.js +++ b/core/modules/parsers/wikiparser/wikiparser.js @@ -1,7 +1,7 @@ /*\ title: $:/core/modules/parsers/wikiparser/wikiparser.js type: application/javascript -module-type: newparser +module-type: parser The wiki text parser processes blocks of source text into a parse tree. diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 2821296f5..2fb82387c 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -374,12 +374,12 @@ exports.clearCache = function(title) { exports.initParsers = function(moduleType) { // Install the new parser modules - $tw.wiki.newparsers = {}; + $tw.wiki.parsers = {}; var self = this; - $tw.modules.forEachModuleOfType("newparser",function(title,module) { + $tw.modules.forEachModuleOfType("parser",function(title,module) { for(var f in module) { if($tw.utils.hop(module,f)) { - $tw.wiki.newparsers[f] = module[f]; // Store the parser class + $tw.wiki.parsers[f] = module[f]; // Store the parser class } } }); @@ -396,12 +396,12 @@ Options include: exports.parseText = function(type,text,options) { options = options || {}; // Select a parser - var Parser = this.newparsers[type]; + var Parser = this.parsers[type]; if(!Parser && $tw.config.fileExtensionInfo[type]) { - Parser = this.newparsers[$tw.config.fileExtensionInfo[type].type]; + Parser = this.parsers[$tw.config.fileExtensionInfo[type].type]; } if(!Parser) { - Parser = this.newparsers[options.defaultType || "text/vnd.tiddlywiki"]; + Parser = this.parsers[options.defaultType || "text/vnd.tiddlywiki"]; } if(!Parser) { return null;