Ver Fonte

fix(share): don't highlight words unless split

Adam há 3 meses atrás
pai
commit
d74663bf53

+ 1 - 1
packages/enterprise/src/routes/share/[shareID].tsx

@@ -91,7 +91,7 @@ const getData = query(async (shareID) => {
                 diffIndicators: "bars",
                 diffIndicators: "bars",
                 disableBackground: false,
                 disableBackground: false,
                 expansionLineCount: 20,
                 expansionLineCount: 20,
-                lineDiffType: "word-alt",
+                lineDiffType: "none",
                 maxLineDiffLength: 1000,
                 maxLineDiffLength: 1000,
                 maxLineLengthForHighlighting: 1000,
                 maxLineLengthForHighlighting: 1000,
                 disableFileHeader: true,
                 disableFileHeader: true,

+ 1 - 1
packages/ui/src/components/diff.tsx

@@ -33,7 +33,7 @@ export function Diff<T>(props: DiffProps<T>) {
     diffIndicators: "bars",
     diffIndicators: "bars",
     disableBackground: false,
     disableBackground: false,
     expansionLineCount: 20,
     expansionLineCount: 20,
-    lineDiffType: "word-alt",
+    lineDiffType: props.diffStyle === "split" ? "word-alt" : "none",
     maxLineDiffLength: 1000,
     maxLineDiffLength: 1000,
     maxLineLengthForHighlighting: 1000,
     maxLineLengthForHighlighting: 1000,
     disableFileHeader: true,
     disableFileHeader: true,