Skip to content

Commit

Permalink
chore(BuildTool): fix api md splice problem
Browse files Browse the repository at this point in the history
  • Loading branch information
YSMJ1994 committed Jan 19, 2024
1 parent 530d666 commit b8f5977
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,13 @@ export function registryApiGenerator(file = __filename) {
);
});
const apiLevel = apiNode.depth as number;
const spliceStart = apiNode.position.end.line + 1;
const deleteCount = nextNode
? nextNode.position.start.line - 1 - spliceStart
: lines.length - spliceStart;
lines.splice(
apiNode.position.end.line + 1,
nextNode ? nextNode.position.start.line - 1 : lines.length,
spliceStart,
deleteCount,
tsDocMetas
.map(
({
Expand Down

0 comments on commit b8f5977

Please sign in to comment.