Commit Graph
4 Commits
Author SHA1 Message Date
pravit-ampandPravit Ampapathini c7d608570c refactor(explorer): move isSafeUrl out of MarkdownContentViewer (#1119) (#1194)
MarkdownContentViewer.tsx exported the isSafeUrl helper alongside the
component so it could be unit tested, which tripped
react-refresh/only-export-components.

Move the helper into a sibling pure module, markdownUrlSafety.ts,
following the existing GraphWorkspace convention for testable non-component
logic (graphAnalytics.ts, pluginRegistryPredicates.ts,
temporalLifecyclePredicates.ts). The function body is moved verbatim — the
scheme allowlist, protocol-relative rejection, whitespace-only guard and
malformed-URL handling are unchanged — so the existing URL-safety tests pass
untouched apart from the import path.

The component module now exports only its component and prop type, clearing
the lint error without any change to the lint configuration.

Co-authored-by: Pravit Ampapathini <pravit.amp@gmail.com>
2026-08-25 16:32:34 +05:00
Sameer6305 7b2b2efe6b fix(explorer): harden markdown viewer review findings 2026-08-19 15:37:12 +05:30
Sakshi Jain 5a3bdc393d fix(explorer): address review feedback on markdown viewer 2026-08-19 09:58:17 +05:30
Sakshi Jain 0f308b2078 feat(explorer): add markdown content preview and source view 2026-08-18 12:04:53 +05:30