@@ -133,6 +133,8 @@ export class DiffFile {
133133
134134 #highlighterName?: string ;
135135
136+ #highlighterType?: string ;
137+
136138 #theme: "light" | "dark" = "light" ;
137139
138140 #_theme?: "light" | "dark" ;
@@ -598,6 +600,8 @@ export class DiffFile {
598600 initSyntax ( { registerHighlighter } : { registerHighlighter ?: Omit < DiffHighlighter , "getHighlighterEngine" > } = { } ) {
599601 if ( this . #hasInitSyntax && ( ! this . #_theme || this . #theme === this . #_theme) ) return ;
600602
603+ if ( this . #highlighterType === "class" ) return ;
604+
601605 if ( this . #composeByMerge && ! this . #composeByFullMerge) {
602606 __DEV__ &&
603607 console . error (
@@ -611,6 +615,9 @@ export class DiffFile {
611615 this . #highlighterName =
612616 this . #oldFileResult?. highlighterName || this . #newFileResult?. highlighterName || this . #highlighterName;
613617
618+ this . #highlighterType =
619+ this . #oldFileResult?. highlighterType || this . #newFileResult?. highlighterType || this . #highlighterType;
620+
614621 this . #hasInitSyntax = true ;
615622 }
616623
@@ -1285,6 +1292,7 @@ export class DiffFile {
12851292 const fileLineLength = this . fileLineLength ;
12861293 const composeByDiff = this . #composeByDiff;
12871294 const highlighterName = this . #highlighterName;
1295+ const highlighterType = this . #highlighterType;
12881296 const hasSomeLineCollapsed = this . hasSomeLineCollapsed ;
12891297
12901298 // split
@@ -1322,6 +1330,7 @@ export class DiffFile {
13221330 unifiedHunkLines,
13231331
13241332 highlighterName,
1333+ highlighterType,
13251334 composeByDiff,
13261335 hasSomeLineCollapsed,
13271336
@@ -1340,6 +1349,7 @@ export class DiffFile {
13401349 this . #hasBuildUnified = data . hasBuildUnified ;
13411350 this . #composeByDiff = data . composeByDiff ;
13421351 this . #highlighterName = data . highlighterName ;
1352+ this . #highlighterType = data . highlighterType ;
13431353
13441354 this . #oldFileLines = data . oldFileLines ;
13451355 this . #oldFileDiffLines = data . oldFileDiffLines ;
0 commit comments