Skip to content

Commit

Permalink
Tweak #7866 to omit "rule" property when unset, instead of leaving it…
Browse files Browse the repository at this point in the history
… null

Also make tests pass
  • Loading branch information
Jermolene committed Jun 8, 2024
1 parent 5db3eee commit 1a57d08
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 33 deletions.
4 changes: 2 additions & 2 deletions core/modules/parsers/wikiparser/wikiparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,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: children, start: start, end: end, rule: null }];
return [{type: "element", tag: "p", children: children, start: start, end: end }];
};

/*
Expand Down Expand Up @@ -444,7 +444,7 @@ WikiParser.prototype.pushTextWidget = function(array,text,start,end) {
text = $tw.utils.trim(text);
}
if(text) {
array.push({type: "text", text: text, start: start, end: end, rule: null});
array.push({type: "text", text: text, start: start, end: end});
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ title: ExpectedResult
"value": "Something"
}
],
"isProcedureDefinition": true
"isProcedureDefinition": true,
"start": 0,
"end": 43,
"rule": "fnprocdef"
}
]
</p>
Loading

0 comments on commit 1a57d08

Please sign in to comment.