mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-30 21:12:40 +00:00
29 lines
512 B
JavaScript
29 lines
512 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/railroad/typed-parser.js
|
|
type: application/javascript
|
|
module-type: parser
|
|
|
|
This parser wraps unadorned railroad syntax into a railroad widget
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
var RailroadParser = function(type,text,options) {
|
|
var element = {
|
|
type: "railroad",
|
|
tag: "$railroad",
|
|
text: text
|
|
};
|
|
this.tree = [element];
|
|
console.log(text);
|
|
};
|
|
|
|
exports["text/vnd.tiddlywiki.railroad"] = RailroadParser;
|
|
|
|
})();
|
|
|