File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,8 @@ export const getSyntaxDiffTemplateByFastDiff = ({
241241 template += `</span>` ;
242242 } else if ( range . startIndex === range . endIndex ) {
243243 template += `</span>` ;
244+ }
245+ if ( range . endIndex === index ) {
244246 rangeIndex ++ ;
245247 range = allRange [ rangeIndex ] ;
246248 }
@@ -255,8 +257,8 @@ export const getSyntaxDiffTemplateByFastDiff = ({
255257 ? `<span data-diff-highlight style="background-color: var(${ operator === "add" ? addContentHighlightBGName : delContentHighlightBGName } );border-radius: 0.2em;">`
256258 : isEndInSameNode
257259 ? `<span data-diff-highlight style="background-color: var(${ operator === "add" ? addContentHighlightBGName : delContentHighlightBGName } );border-top-right-radius: 0.2em;border-bottom-right-radius: 0.2em;">`
258- // current range crosses the node boundary
259- : `<span data-diff-highlight style="background-color: var(${ operator === "add" ? addContentHighlightBGName : delContentHighlightBGName } );">` ;
260+ : // current range crosses the node boundary
261+ `<span data-diff-highlight style="background-color: var(${ operator === "add" ? addContentHighlightBGName : delContentHighlightBGName } );">` ;
260262 }
261263 template += transform ( value ) ;
262264 if ( isEndStr && changes . newLineSymbol ) {
You can’t perform that action at this time.
0 commit comments