Skip to content

Markion v0.3.12

Choose a tag to compare

@github-actions github-actions released this 17 Sep 14:41
· 35 commits to main since this release

Markion v0.3.12

Adds a complete image resource and upload workflow, and fixes Visual Edit caret placement at heading and list whitespace boundaries.

Highlights

Image resources and uploads

  • New Preferences → Images tab with independent policies for local image files (keep reference, copy, upload), clipboard images (save locally, upload), and remote images (keep URL, download, download then upload). Opening, rendering, saving, or exporting a document never starts a transfer.
  • Document-relative resource folder templates: the default {document}.assets, plus assets and assets/{document}, including nested relative segments and percent-encoded Markdown URLs.
  • Upload adapters for PicGo HTTP (default http://127.0.0.1:36677/upload), PicGo Core CLI, and user-configured commands, with a Test upload button that verifies a provider without touching a document.
  • Single-image Upload/Save actions and document-wide Upload Document Images / Save Document Images Locally, grouped under Format → Images and the visual editor's image right-click menu.
  • Transfers run off the UI thread with cancellation, retry, and partial-result reporting; a completed batch applies as one undoable edit, and results that could not be applied are retained in a recovery list under Preferences → Images.
  • Preview decodes percent-encoded local image URLs (for example Chinese document names) and shows a short placeholder with the filename instead of a system error when an image cannot load.

Fixes

  • Visual Edit no longer paints the caret below a bare # heading marker while the canonical caret sits after the marker: terminal line-ending ownership, blank-row geometry, pointer placement, and Up/Down navigation now agree on the same source line, for both LF and CRLF.
  • Whitespace-only list tail lines (spaces or tabs) keep their line breaks, so repeated Enter after leaving a nested list keeps the caret at the typed position.
  • The same audit also repaired bare list prefixes without trailing spaces, quoted headings creating a spurious blank prefix row, missing carets at hidden link boundaries, duplicate carets at mixed-fragment endpoints, and Up skipping list text from its terminal blank line.

Compatibility

  • No migration required: documents stay canonical Markdown, and the new config.toml [images] sections are optional — without them Markion behaves as before (local files are copied to <document>.assets, remote URLs are left untouched).
  • Image policies affect explicit operations only; existing images, links, and resource directories are not moved or rewritten, and undo never deletes a cloud object.
  • Unsigned Windows and macOS installers still require SmartScreen or Gatekeeper bypass steps. The macOS and Linux manual browser checks remain deferred, as recorded in previous releases.
  • Known limitation: the PicGo HTTP, PicGo Core, and custom-command adapters are covered by automated fixtures, but an end-to-end upload against a real PicGo installation and image host was not performed on this host; docs/image-upload-smoke-2026-09-17.md records that check as still incomplete.

Downloads

  • Windows x64: NSIS installer.
  • macOS Apple Silicon: DMG.
  • Linux x86_64: DEB and AppImage.

Verification

  • Local: cargo test --workspace passed 1,757 tests across 43 suites with 0 failures (5 ignored); verify-bundle verified the pinned MarkNice workspace bundle (23 files, 3,140,387 bytes, revision c009c1ec7e7c92f89afa5a32edcb126b5296bda7).
  • CI: native build and package on Windows, macOS Apple Silicon, and Linux, plus Windows updater signing, GitHub Release publication, and the Aliyun OSS mirror.

Full comparison: v0.3.11...v0.3.12


Markion v0.3.12(中文说明)

新增完整的图片资源与上传工作流,并修复 Visual Edit 在标题与列表空白边界处的光标定位。

主要更新

图片资源与上传

  • 新增 偏好设置 → 图片 标签页,可分别为本地图片文件(保留引用 / 复制 / 上传)、剪贴板图片(本地保存 / 上传)、远程图片(保留 URL / 下载 / 下载后上传)设置策略。打开、渲染、保存或导出文档都不会触发传输。
  • 支持文档相对资源目录模板:默认 {document}.assets,另有 assets 与 assets/{document},可包含嵌套相对路径,Markdown 链接使用百分号编码。
  • 提供 PicGo HTTP(默认 http://127.0.0.1:36677/upload)、PicGo Core 命令行与 自定义命令 三种上传适配器,并有 测试上传 按钮,可在不改动文档的情况下验证图床配置。
  • 单张图片的 上传 / 保存 操作,以及整篇文档的 上传文档图片 / 本地保存文档图片,统一收在 格式 → 图片 子菜单与可视化编辑器的图片右键菜单中。
  • 传输在 UI 线程之外执行,支持取消、重试与部分结果上报;一次完成的批量替换作为一个可撤销编辑应用,未能应用的结果保留在“偏好设置 → 图片”的恢复列表中。
  • 预览会解码本地图片 URL 的百分号编码(例如中文文档名);图片无法加载时,在文档内显示简短的占位说明(含文件名),而不是系统错误。

修复

  • Visual Edit 不再把光标画在裸 # 标题标记下方、而规范光标却位于标记之后:终止行结尾归属、空行几何、鼠标落点与上下键导航现在与同一源行保持一致(LF 与 CRLF 均适用)。
  • 仅含空白(空格或制表符)的列表尾部行不再丢失换行,退出嵌套列表后连续按 Enter,光标会停留在实际输入位置。
  • 同一次审计还修复了:无尾随空格的裸列表前缀、引用标题产生多余的空前缀行、隐藏链接边界处缺失光标、混合片段末尾的重复光标,以及从列表末尾空行按上键时跳过列表文本。

兼容性

  • 无需迁移:文档仍以标准 Markdown 存储,新增的 config.toml [images] 配置段为可选;未设置时行为与之前一致(本地图片复制到 <document>.assets,远程图片 URL 保持不变)。
  • 图片策略只影响此后显式发起的操作,不会移动或改写既有图片、链接与资源目录;撤销也绝不会删除云端对象。
  • Windows 与 macOS 安装包仍未签名,通常需要手动绕过 SmartScreen 或 Gatekeeper。macOS 与 Linux 的手动浏览器检查与往次一致,仍记录为延后。
  • 已知限制:PicGo HTTP、PicGo Core 与自定义命令适配器仅由自动化夹具覆盖,本机未针对真实 PicGo 安装与图床做端到端上传验证;docs/image-upload-smoke-2026-09-17.md 已如实记录该检查尚未完成。

下载

  • Windows x64:NSIS 安装程序。
  • macOS Apple Silicon:DMG。
  • Linux x86_64:DEB 与 AppImage。

验证

  • 本地:cargo test --workspace 在 43 个测试套件中通过 1,757 项测试,0 失败(5 项忽略);verify-bundle 校验了固定版本的 MarkNice 工作区(23 个文件、3,140,387 字节,修订号 c009c1ec7e7c92f89afa5a32edcb126b5296bda7)。
  • CI:Windows、macOS Apple Silicon、Linux 原生构建与打包,以及 Windows 更新签名、GitHub Release 发布与阿里云 OSS 镜像。

完整变更对比: v0.3.11...v0.3.12