1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Replaced restructuring and added fallback comment

This commit is contained in:
Miha Lunar 2021-04-25 13:12:45 +02:00
parent 1b226c7556
commit 23bd7e7817

View File

@ -168,6 +168,7 @@ WikiParser.prototype.findNextMatch = function(rules,startPos) {
WikiParser.prototype.parseRule = function(rule) {
var start = this.pos,
blocks = rule.parse();
// Use fallback parent range for blocks that don't define their own
for(var i=0; i<blocks.length; i++) {
var block = blocks[i];
if(block.start !== undefined) {
@ -229,7 +230,7 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
var start = this.pos;
var children = this.parseInlineRun(terminatorRegExp);
var end = this.pos;
return [{type: "element", tag: "p", children, start, end }];
return [{type: "element", tag: "p", children: children, start: start, end: end }];
};
/*