[pull] main from TypeCellOS:main#302
Merged
Merged
Conversation
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )