1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 10:13:16 +00:00
TiddlyWiki5/rabbithole/core/modules/parsers/plaintextparser.js
Jeremy Ruston d93bbbbe7b Introduce plugin module mechanism
See the readme for details
2012-04-30 12:23:03 +01:00

24 lines
465 B
JavaScript

/*\
title: $:/core/parsers/plaintextparser.js
type: application/javascript
module-type: parser
Renders plain text tiddlers
\*/
(function(){
/*jslint node: true */
"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;
})();