TiddlyWiki5/core/modules/parsers/newwikitextparser/rules/coderun.js

27 wiersze
507 B
JavaScript
Czysty Zwykły widok Historia

2012-06-02 08:41:21 +00:00
/*\
title: $:/core/modules/parsers/newwikitextparser/rules/coderun.js
2012-06-02 08:41:21 +00:00
type: application/javascript
module-type: wikitextrule
Wiki text run rule for code runs
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "coderun";
2012-06-02 08:41:21 +00:00
exports.runParser = true;
exports.regExpString = "\\{\\{\\{";
exports.parse = function(match,isBlock) {
this.pos = match.index + match[0].length;
return [$tw.Tree.Element("code",{},this.parseRun(/(\}\}\})/mg))];
};
})();