fixed all rendering differences

This commit is contained in:
Austin Fulbright 2024-07-27 02:02:12 -04:00
parent 9f6a7b79ac
commit 275dbe9b2e
3 changed files with 5 additions and 3 deletions

View File

@ -287,6 +287,7 @@ export const cherryPick = function (
targetId = common.sanitizeText(targetId, getConfig()); targetId = common.sanitizeText(targetId, getConfig());
const config = getConfig(); const config = getConfig();
tags = tags?.map((tag) => common.sanitizeText(tag, config)); tags = tags?.map((tag) => common.sanitizeText(tag, config));
parentCommitId = common.sanitizeText(parentCommitId, getConfig()); parentCommitId = common.sanitizeText(parentCommitId, getConfig());
if (!sourceId || !state.records.commits.has(sourceId)) { if (!sourceId || !state.records.commits.has(sourceId)) {
@ -383,6 +384,7 @@ export const cherryPick = function (
}`, }`,
], ],
}; };
state.records.head = commit; state.records.head = commit;
state.records.commits.set(commit.id, commit); state.records.commits.set(commit.id, commit);
state.records.branches.set(state.records.currBranch, commit.id); state.records.branches.set(state.records.currBranch, commit.id);

View File

@ -76,7 +76,7 @@ const parseCheckout = (checkout: CheckoutAst) => {
const parseCherryPicking = (cherryPicking: CherryPickingAst) => { const parseCherryPicking = (cherryPicking: CherryPickingAst) => {
const id = cherryPicking.id; const id = cherryPicking.id;
const tags = cherryPicking.tags ?? undefined; const tags = cherryPicking.tags?.length === 0 ? undefined : cherryPicking.tags;
const parent = cherryPicking.parent; const parent = cherryPicking.parent;
db.cherryPick(id, '', tags, parent); db.cherryPick(id, '', tags, parent);
}; };

View File

@ -65,7 +65,7 @@ Merge:
( (
'id:' id=STRING 'id:' id=STRING
|'tag:' tags+=STRING |'tag:' tags+=STRING
|'type:' name=('NORMAL' | 'REVERSE' | 'HIGHLIGHT') |'type:' type=('NORMAL' | 'REVERSE' | 'HIGHLIGHT')
)* EOL; )* EOL;
Checkout: Checkout:
@ -76,7 +76,7 @@ CherryPicking:
( (
'id:' id=STRING 'id:' id=STRING
|'tag:' tags+=STRING |'tag:' tags+=STRING
|'parent:' id=STRING |'parent:' parent=STRING
)* EOL; )* EOL;