[#756] Markdown 렌더러를 로컬 WKWebView 기반으로 교체한다#768
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ba8a5e73c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39aa8a8027
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49e7daf1e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🔗 연관된 이슈
🎯 의도
MarkdownUI의 확장성 한계를 해소하고 GFM, 각주, 코드 구문 강조, Todo 참조 문법을 지원하는 앱 내장 렌더러로 전환WKWebView문맥에서 처리하는 일관된 스크롤 동작 확보📝 작업 내용
📌 요약
MarkdownRendererView와 Swift-JavaScript bridge 추가WKWebView로 전환TodoReferenceNormalizer추가MarkdownUI의존성 제거🔍 상세
Markdown renderer 구성
remark-gfm,rehype-sanitize,rehype-highlight,github-markdown-css기반 렌더링 구성index.html,renderer.css,renderer.js를 사용하는 오프라인 렌더링 구성0이 포함된 Todo 참조를- refs #번호형태로 정규화todoReferencePlugin이 정규화된 목록 항목만 변환하도록 AST 예외 처리 제거renderer.js를 저장소에서 추적하고 원본과 산출물의 일치 여부를 검증하도록 구성WKWebView 통신과 사용자 동작
MarkdownRendererView와WKScriptMessageHandler기반 통신 경로 추가- refs #번호문법을 Todo 참조 링크로 변환하는 처리 추가http,https,mailto외부 링크 처리와 허용하지 않은 URL 차단WKWebView가 스크롤을 담당하도록 전환의존성과 화면 구성 정리
MarkdownUI사용 경로를MarkdownRendererView로 교체MarkdownUI패키지와 관련 설정 제거검증 구성
0, fenced code 경계를 확인하는 정규화 회귀 테스트 추가메모리 사용량 비교
📸 영상 / 이미지 (Optional)
ScreenRecording_07-25-2026.12-26-45_1.MP4
flowchart TB subgraph S1["1. 렌더링 입력"] direction LR A["RenderPayload"] --> B["window.renderMarkdown"] B --> C["문서 표시값<br/>lang · colorScheme · fontSize"] B --> D["Markdown · references"] end subgraph S2["2. Markdown 처리"] direction LR D --> E["fenced code 범위 분석"] E --> F["Todo 참조 문법 정규화"] F --> G["Markdown AST<br/>remark-parse + remark-gfm"] G --> H["Todo 참조 AST 변환"] H --> I["HTML AST<br/>remark-rehype"] end subgraph S3["3. HTML 렌더링"] direction LR I --> J["구문 강조"] J --> K["HTML 정제"] K --> L["HTML 문자열 생성"] L --> M["root.innerHTML 반영"] M --> N["WKWebView document"] C --> N O["renderer.css"] --> N end