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
2 changes: 1 addition & 1 deletion src/components/explorer/CodeInspectorDock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function CodeInspectorDock({ state, setState, filePath, owner, repo }: Co
const startHeight = dragHeight;
const onMouseMove = (moveEvent: MouseEvent) => {
const deltaY = startY - moveEvent.clientY;
setDragHeight(Math.max(200, Math.min(window.innerHeight * 0.35, startHeight + deltaY)));
setDragHeight(Math.max(200, Math.min(window.innerHeight * 0.9, startHeight + deltaY)));
};
const onMouseUp = () => {
document.removeEventListener('mousemove', onMouseMove);
Expand Down
3 changes: 2 additions & 1 deletion src/components/ui/SyntaxHighlighter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import hljs from 'highlight.js';
import DOMPurify from 'dompurify';
import type { ReactNode } from 'react';

function languageFromPath(path: string): string {
Expand Down Expand Up @@ -92,7 +93,7 @@ export function HighlightedCode({
</span>
<code
className="hljs min-w-0 flex-1 whitespace-pre pl-4"
dangerouslySetInnerHTML={{ __html: html }}
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(html) }}
/>
</div>
);
Expand Down
Loading