mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
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>