mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-23 23:46:52 +00:00
Replaced restructuring and added fallback comment
This commit is contained in:
parent
1b226c7556
commit
23bd7e7817
@ -168,6 +168,7 @@ WikiParser.prototype.findNextMatch = function(rules,startPos) {
|
|||||||
WikiParser.prototype.parseRule = function(rule) {
|
WikiParser.prototype.parseRule = function(rule) {
|
||||||
var start = this.pos,
|
var start = this.pos,
|
||||||
blocks = rule.parse();
|
blocks = rule.parse();
|
||||||
|
// Use fallback parent range for blocks that don't define their own
|
||||||
for(var i=0; i<blocks.length; i++) {
|
for(var i=0; i<blocks.length; i++) {
|
||||||
var block = blocks[i];
|
var block = blocks[i];
|
||||||
if(block.start !== undefined) {
|
if(block.start !== undefined) {
|
||||||
@ -229,7 +230,7 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
|
|||||||
var start = this.pos;
|
var start = this.pos;
|
||||||
var children = this.parseInlineRun(terminatorRegExp);
|
var children = this.parseInlineRun(terminatorRegExp);
|
||||||
var end = this.pos;
|
var end = this.pos;
|
||||||
return [{type: "element", tag: "p", children, start, end }];
|
return [{type: "element", tag: "p", children: children, start: start, end: end }];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user