mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-28 14:09:22 +02:00
Extract three module-local helpers in content-editor.tsx and route the duplicated call sites through them — no behavior change: - normalizeMarkdown(md) / normalizeEditorMarkdown(editor): the single definition of the "strip blob URLs + trimEnd" canonical form, replacing the five editor-markdown sites and the one incoming-string site. - hasUploadingNode(editor): replaces the two byte-identical document scans (content-sync Guard 0 and hasActiveUploads). The imperative getMarkdown() is deliberately left untrimmed; a safety-net test pins its exact current return value. Scope: WOR-59 upload-readiness review. file-upload.ts untouched; follow-up items B1/F4/F5 are out of scope. Co-authored-by: hzz <331380069@qq.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>