mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-04 05:36:54 +00:00
First step of turning the rabbit hole inside out
This commit is contained in:
26
archive/js/PlainTextParser.js
Normal file
26
archive/js/PlainTextParser.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/*\
|
||||
title: js/PlainTextParser.js
|
||||
|
||||
Renders plain text tiddlers
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true */
|
||||
"use strict";
|
||||
|
||||
var Renderer = require("./Renderer.js").Renderer,
|
||||
Dependencies = require("./Dependencies.js").Dependencies,
|
||||
utils = require("./Utils.js");
|
||||
|
||||
var PlainTextParser = function(options) {
|
||||
this.store = options.store;
|
||||
};
|
||||
|
||||
PlainTextParser.prototype.parse = function(type,text) {
|
||||
return new Renderer([Renderer.ElementNode("pre",{},[Renderer.TextNode(text)])],new Dependencies(),this.store);
|
||||
};
|
||||
|
||||
exports.PlainTextParser = PlainTextParser;
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user