Repository navigation
fix: 修復 Mermaid 預覽文字消失與縮放問題 - #106
Open
eric861129 wants to merge 1 commit into
Open
eric861129 wants to merge 1 commit into
eric861129 wants to merge 1 commit into
Conversation
改用原生 SVG 文字,保留 Mermaid 中文節點與連線標籤,並讓圖表隨預覽寬度縮放。每次渲染還原預覽設定,避免 Word 匯出變更共用設定後再次隱藏文字;補上回歸測試並更新版本至 2.0.2。
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
完整範例的 Mermaid 預覽原本只剩節點方框,中文節點與連線文字會在 SVG 安全清理時被移除。改用原生 SVG 文字並讓圖表依預覽寬度縮放;每次渲染還原預覽設定,確保匯出 Word 後繼續編輯仍能顯示標籤。保留 strict 模式與 DOMPurify 清理,版本更新為 2.0.2。
驗證:
npm run verify:型別檢查、435 項測試與正式建置通過,新增文字保留、安全清理及匯出後再編輯的回歸測試。npm run qa:acceptance、npm run qa:word:三種出版版型的完整範例均通過 OOXML 與 Microsoft Word 驗收,包含邊界、目錄、書籤、圖片、項目符號與待辦清單。