Skip to content

[pull] develop from marktext:develop - #70

Merged
pull[bot] merged 8 commits into
code:developfrom
marktext:develop
Jun 15, 2026
Merged

[pull] develop from marktext:develop#70
pull[bot] merged 8 commits into
code:developfrom
marktext:develop

Conversation

@pull

@pull pull Bot commented Jun 15, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Jocs and others added 8 commits June 15, 2026 17:17
* chore(muya): expand cSpell dictionary and fix a comment typo

Add commonmark/execall/katex/laynezh/setext/snapsvg/webfontloader to the
workspace spell-check word list, and correct "serialises" -> "serializes"
in TableRectSelection's doc comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(muya): rework the selection type surface

These changes are intertwined in the same files/hunks (notably types.ts
and selection/index.ts), so they land together as one cohesive refactor:

- Convert SelectionType from a string-literal union to a string enum, and
  route every comparison/assignment through the enum members. String enum
  members equal their string value at runtime, so the `kind` field emitted
  on selection-change events stays 'text'/'table'/'image' for consumers.
- Nest block/path under ISelection's anchor/focus via IAnchorFocusInfo
  (and IHistoryAnchorFocusInfo for the serialize/restore history variant).
  Update every getSelection()/ISelection consumer to the nested shape while
  keeping the flat ICursor input contract for setSelection() unchanged, so
  producers that build a cursor from a selection map the fields explicitly.
- Drop the unused `selection` field from the selection-change event payload
  (no in-repo listener reads it).
- Coerce the facade's nullable anchor/focus when restoring the selection in
  the inline format toolbar, resolving a Nullable<INodeOffset> vs ICursor
  assignment error.
- Adopt the TBlockPath alias for ICursor paths and tidy selectAll().

Unit tests updated for the nested selection shape; full muya suite passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(desktop): point in-app docs links at marktext.me

The "learn more" links for export themes, key bindings and the local image
folder still pointed at docs/*.md in the GitHub repo. Those files were moved
into the website package (packages/website/content/docs), so the links 404.
Repoint them at the published docs:

  docs/EXPORT_THEMES.md        -> https://marktext.me/docs/export-themes
  docs/end-user/KEYBINDINGS.md -> https://marktext.me/docs/key-bindings
  docs/end-user/IMAGES.md      -> https://marktext.me/docs/images

IMAGES.md existed in the website content tree but was not registered in
docs-nav, so /docs/images would 404. Register it under "Export & themes"
so the new link resolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(desktop): rename openKeybindingWiki -> openKeybindingDocs

The handler opens the key-bindings documentation on marktext.me (not a
wiki) since the link was migrated. Rename it to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…4514)

The package README and the FAQ still linked to docs/*.md under the GitHub
repo, but those docs were moved into this package (content/docs) and are
published on marktext.me. Repoint them:

- README "Documentation" link -> https://marktext.me/docs
- FAQ end-user / developer doc links -> relative content links, which
  markdown.ts rewrites to /docs/introduction and /docs/dev/overview on the
  site (and still resolve when FAQ.md is viewed on GitHub)

Also drop the now-stale "documentation is currently under development" line.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LINUX.md and the three platform key-binding references live under
content/docs/end-user but were never registered in docs-nav, so they had
no route (/docs/* 404) and the relative links to them from the published
Key bindings and Installation pages rendered as dead `*.md` hrefs.

Register all four:
- Linux notes (LINUX.md) under Quick start
- Key bindings (macOS / Linux / Windows) under Configuration

markdown.ts then rewrites the relative links on /docs/key-bindings and
/docs/installation to the new slugs, fixing the broken links.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a complete, natively-reviewed Turkish translation (closes #4476).

Desktop (static/locales/tr.json): all 1058 UI strings translated with
formal address (siz). Markdown markers (---, $$, code fences) and proper
nouns (theme names, diagram tools, cloud providers, language autonyms) are
kept verbatim; all {placeholders} preserved.

Engine (packages/muya/src/locales/tr.ts): the ~90 editor-surface strings
(toolbars, quick-insert, emoji picker, image selector), re-exported from
the muya locales barrel and src/index.ts.

Wiring:
- register 'tr' in SUPPORTED_LANGUAGES (src/common/i18n.ts)
- add the Turkish option to the preferences language dropdown
- add the 'turkish' label (Türkçe) to every locale's language section
- map 'tr' -> muya tr locale in editor.vue, and declare it in the
  @muyajs/core ambient type stub (muya-core.d.ts)

Verified: full e2e suite, unit tests, lint and typecheck (desktop + muya);
the Turkish locale loads end-to-end through the i18n IPC bridge in the
running app.
* feat: make PlantUML server URL configurable

- Add plantumlServer option to Muya options (muyajs + muya)
- Add plantumlServer preference in desktop settings (schema, store, UI)
- Add text field in Preferences > Markdown > Diagrams for the server URL
- Default URL: https://www.plantuml.com/plantuml

* test: add unit and e2e tests for custom PlantUML server URL

* fix: watch plantumlServer preference and apply to muya options dynamically

* i18n: add plantumlServer translations for all locales

---------

Co-authored-by: Marc Lambert <Marc.Lambert@conduent.com>
…4475)

The synthetic save-tracking allocator must map a tab's on-disk content
to id 0 (the store seeds lastSavedHistoryId: 0), but it was created
lazily on the first json-change — i.e. after the first edit — for
documents loaded at editor mount or activated via tab switch. The
pristine content then never mapped to id 0, so undoing back to the
on-disk content produced a fresh id and the tab stayed marked unsaved
forever (and the mis-seeded baseline opened a brief false-clean window
after the very first edit).

Seed the allocator from the engine's own serialization at both missing
baseline points: after muya.init() for the mount-loaded document, and
after setContent on first tab activation (a no-op for tabs that already
have a tracker — switch-back must keep the existing content -> id map).

The regression test already exists in-repo: PG15 in
test/e2e/parity-source-undo-saved.spec.ts, which failed deterministically
before this change and passes after; the G6 divergent-edit guard still
passes.
The custom-server e2e case asserted a `~1` deflate prefix on the encoded
diagram path, but `plantuml-encoder` emits prefix-less base64 regardless of
the server URL — exactly what the default-server case in the same file
already asserts. The two assertions contradicted each other, so the
custom-server test failed on every run (added in #4400). Drop the `~1`
prefix so the expectation matches the encoder output.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jun 15, 2026
@pull pull Bot added the ⤵️ pull label Jun 15, 2026
@pull
pull Bot merged commit 223d37b into code:develop Jun 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants