1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-31 01:48:02 +00:00

add new code to wikiparser

This commit is contained in:
pmario
2022-11-23 17:46:53 +01:00
parent fba9efcf4a
commit 8f2ea2d995

View File

@@ -234,7 +234,12 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
var start = this.pos;
var children = this.parseInlineRun(terminatorRegExp);
var end = this.pos;
return [{type: "element", tag: "p", children: children, start: start, end: end }];
if (children[0].type === "text" ||
($tw.config.htmlBlockElements.indexOf(children[0].tag) === -1 && children[0]?.tag?.charAt(0) !== "$")) {
return [{type: "element", tag: "p", children: children, start: start, end: end }];
} else {
return children;
}
};
/*