Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const LightweightCodeHighlighter = memo<LightweightCodeHighlighter>((prop

const isFileTooLargeToDisplay = useMemo(() => {
return unhighlightedLines.some(line => line.length > MAX_NUMBER_OF_CHARACTER_PER_LINE);
}, [code]);
}, [unhighlightedLines]);

const [highlightedLines, setHighlightedLines] = useState<React.ReactNode[] | null>(null);

Expand Down Expand Up @@ -106,7 +106,8 @@ export const LightweightCodeHighlighter = memo<LightweightCodeHighlighter>((prop
highlightRanges,
highlightStyle,
unhighlightedLines,
lineNumbersOffset
lineNumbersOffset,
isFileTooLargeToDisplay,
]);

const lineCount = (highlightedLines ?? unhighlightedLines).length + lineNumbersOffset;
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/app/[domain]/components/pathHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { getCodeHostInfoForRepo } from "@/lib/utils";
import { LaptopIcon } from "@radix-ui/react-icons";
import clsx from "clsx";
import Image from "next/image";
import Link from "next/link";
import { useBrowseNavigation } from "../browse/hooks/useBrowseNavigation";
import { Copy, CheckCircle2, ChevronRight, MoreHorizontal } from "lucide-react";
import { useCallback, useState, useMemo, useRef, useEffect } from "react";
Expand Down