You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
移除 / Removed
移除「高清位图 PDF」导出:「PDF(矢量打印)」已能覆盖 PDF 导出需求(文字/公式任意放大清晰),故移除与之重叠的「PDF(高清位图)」选项,简化导出菜单(现为 Markdown / HTML / PDF(矢量打印)/ LaTeX);顺带消除 macOS WKWebView 下位图路径末尾内容丢失(BUG-078)的根源。 Removed "PDF (high-res raster)" export: "PDF (vector print)" already covers PDF export (text/formulas stay crisp at any zoom), so the overlapping "PDF (high-res raster)" option is removed to simplify the export menu (now Markdown / HTML / PDF (vector print) / LaTeX); this also eliminates the root cause of the trailing-content loss in the WKWebView raster path (BUG-078).
修复 / Fixes
Windows 下相对路径图片不再无法渲染:Windows 安装版打开/新建含相对路径图片(如 )的文档、或粘贴/拖入图片时,渲染区图片此前一律不显示(macOS/Linux 正常)。根因是前端 dirOf/baseName 用 lastIndexOf("/")、relPath 用 split("/"),只认 Unix /;而 Rust 在 Windows 返回的是反斜杠绝对路径(C:\Users\…),导致 tab.dir 被算成空,resolveImages 的"无目录则跳过"守卫误杀所有相对路径图,粘贴图片的落盘目录还会拼成 /stem_images 写到盘符根目录。现让这三个函数同时认 / 与 \,Windows 下相对/绝对路径图片均正常渲染。该问题与编译工具链(MSVC / 交叉编译 GNU)无关,属纯前端逻辑,所有 Windows 运行版皆受影响(BUG-080)。 Relative-path images now render on Windows: On the Windows build, opening/creating a document with relative-path images (e.g. ), or pasting/dropping an image, left the render area blank (macOS/Linux were fine). Root cause: dirOf/baseName used lastIndexOf("/") and relPath used split("/") — Unix / only — but Rust returns backslash absolute paths on Windows (C:\Users\…), so tab.dir computed to empty and the "skip if no dir" guard in resolveImages killed every relative-path image (pasted images even landed in the drive root via /stem_images). These three helpers now accept both / and \, so relative and absolute images render correctly on Windows. This is a pure-frontend issue independent of the toolchain (MSVC / cross-compiled GNU) and affects every Windows build (BUG-080).
调整 / Changed
另存为格式弹窗:底部"取消"键改为右上角 ×:「另存为」时选择导出格式(Markdown / HTML / PDF / LaTeX)的自绘弹窗,原本在底部排一个"取消"按钮,现改为卡片右上角的 × 关闭按钮(与帮助、Mermaid 查看器等弹窗统一)。取消途径仍为三种等价:点右上角 ×、点遮罩空白、按 Esc。× 位置用 inset-inline-end,在阿拉伯/乌尔都等 RTL 语言下自动落到左上角。 Save-as format dialog: bottom "Cancel" → top-right ×: The self-drawn format-picker (Markdown / HTML / PDF / LaTeX) shown on "Save As" previously placed a "Cancel" button in the bottom row; it's now a × close button in the card's top-right corner (consistent with the Help and Mermaid-viewer dialogs). Cancellation still works three equivalent ways: click ×, click the backdrop, or press Esc. The × uses inset-inline-end so it flips to the top-left under RTL languages (Arabic/Urdu/etc.).
修复 / Fixes
矢量 PDF 导出图片不再变问号:含相对路径图片的文档(如「MDeX 示例」的图标)在「另存为 PDF(矢量打印)」时,图片在生成的 PDF 里显示为问号(broken);敲空格触发重渲后图标恢复、再导出又变问号,反复横跳。根因是导出前 preview.innerHTML = lastFullHtml 把预览重置回原始相对路径后直接打印,未把图片 resolve 成 data URL;而 lastFullHtml 快照里 <img> 始终是相对路径(resolveImages 只改 DOM 不回写字符串)。现打印前补 resolveImagesForExport(与导出同源处理),图片正常渲染。 Vector-PDF images no longer show as broken: A document with relative-path images (e.g. the MDeX sample icon) rendered images as broken (?-icons) when saved via "Save as PDF (vector print)"; typing a space to re-render fixed it temporarily, but re-exporting broke it again. The export reset the preview to lastFullHtml (which always holds raw relative paths — resolveImages mutates only the DOM, not the snapshot) and printed without resolving images to data URLs. A resolveImagesForExport step is now run before printing, so images render correctly.