Commit Graph
8896 Commits
Author SHA1 Message Date
Neil f510ae1efd refactor(editor): simplify keyboard shortcut dispatch 2026-09-18 17:10:47 -07:00
Neil fdbeab981d test(editor): preserve table Enter ownership for headings 2026-09-18 17:04:02 -07:00
Neil 7cbb336d59 Merge branch 'stack-structure' into stack-preview 2026-09-18 17:01:06 -07:00
Neil c5ea10fa5f Merge branch 'nwparker/markdown-better' into stack-structure 2026-09-18 17:01:04 -07:00
Neil b0808741ec refactor(editor): pair padding masks with their restore token 2026-09-18 17:00:45 -07:00
Neil 870cfbbb94 Merge branch 'stack-structure' into stack-preview 2026-09-18 16:59:29 -07:00
Neil 37def42ff7 Merge branch 'nwparker/markdown-better' into stack-structure 2026-09-18 16:59:12 -07:00
Neil 90a6822544 Merge branch 'nwparker/markdown-scanners' into nwparker/markdown-better 2026-09-18 16:58:55 -07:00
Neil b3b98cfdaf test(editor): verify standalone scanner boundaries 2026-09-18 16:58:38 -07:00
Neil 617ceb791f test(editor): distinguish saved fallback from unsaved draft 2026-09-18 16:57:00 -07:00
Neil 6afe452eb0 fix(editor): protect fence info and unsaved preview boundaries 2026-09-18 16:50:23 -07:00
Neil dbf0cc27b5 Merge branch 'stack-structure' into stack-preview 2026-09-18 16:49:06 -07:00
Neil 6ae6252e0d Merge branch 'nwparker/markdown-better' into stack-structure 2026-09-18 16:49:01 -07:00
Neil 24cbbd6c2b refactor(editor): add shared Markdown scanners 2026-09-18 16:48:57 -07:00
Neil a9d6e3a5bb fix(editor): support CJK emphasis in preview 2026-09-18 16:48:55 -07:00
Neil 3132c48fdc fix(editor): preserve code contents and validate reference candidates 2026-09-18 16:48:28 -07:00
Neil 9ed7b45fe7 fix(editor): harden Markdown scanners and fixtures 2026-09-18 16:43:15 -07:00
Frederic Barthelemy f4c3a593e4 feat(editor): offer the markdown preview when rich mode falls back
Reference links, footnotes, unsupported HTML, and oversized files park
markdown edit tabs in Source mode with a banner, but the dedicated
read-only preview was reachable only through a menu item and a
shortcut. Add Preview to the view toggle and to the banner for exactly
this case, reusing the existing preview tab instead of duplicating it.
2026-09-18 04:32:01 -07:00
Neil c1365740ea test(editor): cover consecutive fenced code transport 2026-09-18 04:30:21 -07:00
Neil d75e511f4f test(editor): cover markdown corruption task repro 2026-09-18 04:28:38 -07:00
Neil 80ddaf7c47 test(editor): cover nested code mark round trips 2026-09-18 04:26:59 -07:00
Neil 3f950cec0f fix(editor): choose safe markdown code fences 2026-09-18 04:23:07 -07:00
Neil 8447710c60 test(editor): cover mounted markdown clipboard slices 2026-09-18 04:15:59 -07:00
Neil 2b29d2d5cc fix(editor): type table cell rendering 2026-09-18 04:10:41 -07:00
Neil 4e38a80ab9 test(editor): cover dollar-heavy source reconciliation 2026-09-18 04:08:51 -07:00
Neil 5383679a22 fix(editor): keep wide code lines scrollable 2026-09-18 04:05:39 -07:00
Neil c5011c3d7e fix(editor): scroll wide markdown code blocks 2026-09-18 03:45:08 -07:00
Neil a4f60ff9ea fix(editor): preserve table cell line breaks 2026-09-18 03:42:00 -07:00
Neil a7cfdddfe5 fix(editor): split headings into paragraphs 2026-09-18 03:37:46 -07:00
Neil 89ee2e7363 fix(editor): preserve markdown on clipboard copy 2026-09-18 03:27:42 -07:00
Neil f7b3a4a3fb test(editor): cover bounded table output 2026-09-18 03:22:51 -07:00
Neil 3ad7b36afb fix(editor): bound markdown table column padding 2026-09-18 03:21:21 -07:00
Neil 95b121cac2 fix(editor): handle tilde fences in ordered items 2026-09-18 02:40:51 -07:00
Neil bf8c14df78 fix(editor): stabilize fenced code in ordered lists 2026-09-18 02:36:00 -07:00
Neil ce8f93cb56 fix(editor): preserve zero-start ordered lists 2026-09-18 02:04:20 -07:00
Neil ba7e4dc85b fix(editor): preserve prose markdown entities 2026-09-18 01:56:06 -07:00
Neil 45fcfef994 fix(editor): preserve ordered list continuation columns 2026-09-18 01:42:46 -07:00
Neil 150f834fe6 fix(editor): satisfy code span serializer type checks 2026-09-18 01:32:20 -07:00
Neil 549e93cb26 fix(editor): preserve inline code span padding 2026-09-18 01:30:28 -07:00
Neil 3dd62ec141 Revert "fix(editor): keep emphasis outside a code span on serialize"
This reverts commit 22eda4ba82.
2026-09-18 01:25:22 -07:00
Frederic Barthelemy 22eda4ba82 fix(editor): keep emphasis outside a code span on serialize
Bold wrapping a code span came back inverted: ``**`B93934206`**``
serialized to `` `**B93934206**` ``, turning bold text into literal
asterisks.

ProseMirror ranks a text node's marks by schema order, which Tiptap
derives from extension priority, so the parser's correct order was
renormalized. Raise code above emphasis; link stays below code so
linked code labels keep serializing.
2026-09-18 01:25:01 -07:00
Frederic Barthelemy b22fc02610 fix(editor): require non-space delimiters for inline math
The upstream tokenizer matched `$([^$]+)$` with no delimiter rule, so a
second dollar sign anywhere in the paragraph turned prose into a math
span: `Costs are US$ 5,000 and R$ 40,000` lost the space after `US$`.

Require a non-space next to each delimiter and forbid a newline inside,
matching the common dialect. Real math still parses.
2026-09-18 01:22:20 -07:00
Neil fd1c8847bb fix(editor): preserve bare details source tags 2026-09-18 01:14:06 -07:00
Frederic Barthelemy 80a4d0660f fix(editor): preserve the legacy details styling class on round trip
A file saved by an earlier Orca version carries class="orca-details"
in its markdown source. The prior commit stopped the serializer from
ever writing that class, which also stopped it from preserving one a
source already had, so re-saving such a file dropped the class and
the round-trip eligibility check then failed to recognize the file as
its own, regressing it back to Source mode. The details node now
carries a flag set only when its source opening tag had the class, and
the serializer re-emits the class only when that flag is set.
2026-09-18 00:58:57 -07:00
Frederic Barthelemy 68cf9ea08a fix(editor): keep rich mode for documents with details blocks
The markdown serializer always injected class="orca-details" into
saved <details> tags. The rich-mode round-trip check compares the
serialized output against the source's literal opening tag, so any
user-authored <details> without that class failed the comparison and
fell back to Source mode, making the details extension unreachable
from a file. The class is already applied to the rendered DOM node
independently, so the serializer no longer needs to write it into the
markdown source.
2026-09-18 00:58:47 -07:00
Neil be766569bd fix(editor): validate reference syntax tree nodes safely 2026-09-18 00:55:38 -07:00
Neil 1735bcb1b1 fix(editor): classify reference syntax outside HTML comments 2026-09-18 00:53:44 -07:00
Frederic Barthelemy 5f636c1a93 fix(editor): make the reference-link pre-filter linear-time
The nested (?:[ >]*(...)?)* quantifier let a long run of leading
spaces or > with no closing [ trigger catastrophic backtracking,
freezing the renderer on any document with such a line. Replace it
with a single non-nested character class, which is linear and safe
to over-admit since the parser confirms every candidate.
2026-09-18 00:49:32 -07:00
Frederic Barthelemy 0c7661700b fix(editor): cap the reference-link definition parse like the HTML round-trip
hasLinkReferenceDefinition ran a full remark parse on every content
change with no size guard, unlike the HTML round-trip check beside it.
Above the same 50,000-char cap, the pre-filter match is now trusted as
a definition, keeping rich mode blocked rather than risking an
unparsed document opening in it.
2026-09-18 00:49:25 -07:00
Frederic Barthelemy c76729452c fix(editor): admit arbitrarily nested containers in reference-link pre-filter
The pre-filter only matched one list-or-blockquote transition, so a
definition under e.g. list-then-blockquote or three-level nesting
skipped the parser confirmation and rich mode stayed on for content it
cannot round-trip.
2026-09-18 00:48:49 -07:00