mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-19 05:32:51 +00:00
24 lines
465 B
JavaScript
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;
|
||
|
|
||
|
})();
|