mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-30 13:02:53 +00:00
31 lines
502 B
JavaScript
31 lines
502 B
JavaScript
/*\
|
|
title: $:/core/modules/parsers/newwikitextparser/rules/rule.js
|
|
type: application/javascript
|
|
module-type: wikitextrule
|
|
|
|
Wiki text block rule for rules. For example:
|
|
|
|
{{{
|
|
---
|
|
}}}
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports.name = "rule";
|
|
|
|
exports.blockParser = true;
|
|
|
|
exports.regExpString = "-{3,}\r?\n";
|
|
|
|
exports.parse = function(match,isBlock) {
|
|
this.pos = match.index + match[0].length;
|
|
return [$tw.Tree.Element("hr",{},[])];
|
|
};
|
|
|
|
})();
|