1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-06 01:56:20 +00:00
TiddlyWiki5/js/PlainTextParser.js
Jeremy Ruston 7f136dd898 Get rid of the old WikiTextParseTree class
And replace it with a new root Renderer() class
2012-03-03 18:33:16 +00:00

27 lines
567 B
JavaScript

/*\
title: js/PlainTextParser.js
Renders plain text tiddlers
\*/
(function(){
/*jslint node: true */
"use strict";
var Renderer = require("./Renderer.js").Renderer,
Dependencies = require("./Dependencies.js").Dependencies,
utils = require("./Utils.js");
var PlainTextParser = function(options) {
this.store = options.store;
};
PlainTextParser.prototype.parse = function(type,text) {
return new Renderer([Renderer.ElementNode("pre",{},[Renderer.TextNode(text)])],new Dependencies(),this.store);
};
exports.PlainTextParser = PlainTextParser;
})();