Skip to content

Commit e721d6d

Browse files
update
1 parent c6d16c8 commit e721d6d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/core/src/diff-file.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,13 @@ export class DiffFile {
693693
this.#composeDiff();
694694
this.#composeFile();
695695
this.#hasInitRaw = true;
696+
if (__DEV__) {
697+
if (this._diffList.some((l) => l) && !this.#diffLines.length) {
698+
console.warn(
699+
"the hunks from the diff string is empty, maybe the diff string is not a valid diff string, please check the diff string format or the diff string itself"
700+
);
701+
}
702+
}
696703
}
697704

698705
initSyntax({ registerHighlighter }: { registerHighlighter?: Omit<DiffHighlighter, "getHighlighterEngine"> } = {}) {

scripts/build.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ const start = async () => {
128128

129129
start();
130130

131+
// buildCore();
132+
131133
// buildUtils();
132134

133135
// buildShiki();

0 commit comments

Comments
 (0)