2012-04-30 11:23:03 +00:00
|
|
|
/*\
|
2012-05-03 20:47:16 +00:00
|
|
|
title: $:/core/modules/parsers/plaintextparser.js
|
2012-04-30 11:23:03 +00:00
|
|
|
type: application/javascript
|
|
|
|
module-type: parser
|
|
|
|
|
|
|
|
Renders plain text tiddlers
|
|
|
|
|
|
|
|
\*/
|
|
|
|
(function(){
|
|
|
|
|
2012-05-04 17:49:04 +00:00
|
|
|
/*jslint node: true, browser: true */
|
|
|
|
/*global $tw: false */
|
2012-04-30 11:23:03 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var PlainTextParser = function(options) {
|
|
|
|
this.wiki = options.wiki;
|
|
|
|
};
|
|
|
|
|
|
|
|
PlainTextParser.prototype.parse = function(type,text) {
|
|
|
|
return new $tw.Renderer([$tw.Tree.Element("pre",{},[$tw.Tree.Text(text)])],new $tw.Dependencies());
|
|
|
|
};
|
|
|
|
|
|
|
|
exports["text/plain"] = PlainTextParser;
|
|
|
|
|
|
|
|
})();
|