mirror of
https://github.com/openai/codex.git
synced 2026-11-29 00:00:54 +00:00
Preserve Markdown formatting when copying transcript selections (#47896)
## Why Transcript selections were copied as plain text, losing the formatting of rendered Markdown when pasted. ## What changed - Retain semantic Markdown annotations through rendering, wrapping, and streaming, then serialize selected text with balanced markup. - Preserve inline formatting, web links, headings, lists, blockquotes, and hard breaks in Markdown clipboard payloads. - Keep code-only and other literal-only selections as plain text. In mixed selections, escape user prose and fence code, tables, and tool output to preserve their literal content. ## Testing Add unit tests and Markdown/HTML snapshots covering partial selections, nested containers, escaping, links, resize stability, and streaming boundaries. GitOrigin-RevId: f0476334a6bf8ad0fb57626627bd258443540852
This commit is contained in:
@@ -592,6 +592,10 @@ impl TranscriptView {
|
||||
#[path = "transcript_view_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "transcript_view/markdown_copy_tests.rs"]
|
||||
mod markdown_copy_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "transcript_view/copy_on_select_tests.rs"]
|
||||
mod copy_on_select_tests;
|
||||
|
||||
Reference in New Issue
Block a user