Skip to content

[pull] main from TypeCellOS:main#302

Merged
pull[bot] merged 1 commit into
erickirt:mainfrom
TypeCellOS:main
May 15, 2026
Merged

[pull] main from TypeCellOS:main#302
pull[bot] merged 1 commit into
erickirt:mainfrom
TypeCellOS:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 15, 2026

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 : )

* fix: backslash newlines when copying from a code block

When copying inline content from inside a code block, the text/plain
clipboard payload had a backslash before every newline (markdown's
hard-break syntax) and the text/html had `<br>` separators inside the
code instead of literal newlines.

Two changes fix this:

- copyExtension routes selections inside a code block through the
  block-export path so the code block's own toExternalHTML produces
  the proper `<pre><code>` wrapper.
- serializeInlineContentExternalHTML now plumbs blockType through to
  inlineContentToNodes (mirroring the internal HTML serializer) so
  `\n` in code-block content stays as literal text instead of being
  split into hardBreak nodes that render as `<br>`.

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

* fix: drop `as const` from PRETTIFY_OPTIONS to satisfy htmlfy types

`as const` typed `ignore` as a readonly tuple, which doesn't match
`UserConfig.ignore: string[]`, breaking CI typecheck.

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

* test: integrate code-block copy regression into existing copy test suite

Address PR review:
- Drop standalone codeBlockMarkdown.test.ts; add `codeBlockFullContent` and
  `codeBlockPartialSelection` cases to copyTestInstances.ts and snapshot
  text/plain markdown for all copy test instances via a new
  `Copy tests (Markdown)` describe block (mirrors the export test pattern).
- Trim verbose comments in copyExtension and serializeBlocksExternalHTML.
- copyPasteEquality executor now passes the actual markdown payload as the
  text/plain MIME instead of a literal "text" placeholder, so paste handlers
  that prefer text/plain (e.g. inside code blocks) round-trip correctly.
- Update mixedInParagraph snapshots: prettify's `ignore: ["code"]` preserves
  trailing whitespace inside `<code>` spans, which is the actual HTML output.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 15, 2026
@pull pull Bot added the ⤵️ pull label May 15, 2026
@pull pull Bot merged commit c255558 into erickirt:main May 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.

1 participant