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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user