Skip to content

Commit b3e2ca1

Browse files
fix
1 parent 5a9775f commit b3e2ca1

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

packages/core/src/parse/change-range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function checkNewLineSymbolChange(
9393

9494
const hasNewLineChanged = addition.noTrailingNewLine !== deletion.noTrailingNewLine;
9595

96-
if (aSymbol === bSymbol) {
96+
if (aSymbol === bSymbol && !hasNewLineChanged) {
9797
return { addSymbol: undefined, addString: stringA, delSymbol: undefined, delString: stringB };
9898
}
9999

packages/react/src/components/DiffContent.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,15 @@ const DiffSyntax = ({
169169
enableTemplate?: boolean;
170170
}) => {
171171
if (!syntaxLine) {
172-
return <DiffString rawLine={rawLine} diffLine={diffLine} operator={operator} enableTemplate={enableTemplate} />;
172+
return (
173+
<DiffString
174+
rawLine={rawLine}
175+
diffLine={diffLine}
176+
operator={operator}
177+
enableWrap={enableWrap}
178+
enableTemplate={enableTemplate}
179+
/>
180+
);
173181
}
174182

175183
const changes = diffLine?.changes;

packages/vue/src/components/DiffContent.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,15 @@ const DiffSyntax = ({
138138
enableTemplate?: boolean;
139139
}) => {
140140
if (!syntaxLine) {
141-
return <DiffString rawLine={rawLine} diffLine={diffLine} operator={operator} enableTemplate={enableTemplate} />;
141+
return (
142+
<DiffString
143+
rawLine={rawLine}
144+
diffLine={diffLine}
145+
operator={operator}
146+
enableWrap={enableWrap}
147+
enableTemplate={enableTemplate}
148+
/>
149+
);
142150
}
143151

144152
const changes = diffLine?.changes;

0 commit comments

Comments
 (0)