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