Skip to content

Commit

Permalink
refactor(TableToken): minimize branch diff
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Jun 10, 2024
1 parent 250acab commit 1fb85df
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,10 @@ export abstract class TableToken extends TrBaseToken {
inner = halfParsed ? [syntax] : Parser.parse(syntax, this.getAttribute('include'), 2, config).childNodes;
if (this.lastChild.type !== 'table-syntax') {
Shadow.run(() => {
const token = super.insertAt(
new SyntaxToken(undefined, closingPattern, 'table-syntax', config, accum, {
'Stage-1': ':', '!ExtToken': '', TranscludeToken: ':',
}),
);
const token = new SyntaxToken(undefined, closingPattern, 'table-syntax', config, accum, {
'Stage-1': ':', '!ExtToken': '', TranscludeToken: ':',
});
super.insertAt(token);
if (!halfParsed) {
token.afterBuild();
}
Expand Down

0 comments on commit 1fb85df

Please sign in to comment.