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
|
|
|
|
|
2012-05-19 17:23:14 +00:00
|
|
|
Parses plain text tiddlers
|
2012-04-30 11:23:03 +00:00
|
|
|
|
|
|
|
\*/
|
|
|
|
(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;
|
|
|
|
|
2012-05-08 16:42:49 +00:00
|
|
|
})();
|