story-kit: create 192_bug_code_fences_lose_newlines_when_pasted_from_agent_output

This commit is contained in:
Dave
2026-02-25 16:29:26 +00:00
parent b83e9f6128
commit ea447c5b3c

View File

@@ -0,0 +1,28 @@
---
name: "Code fences lose newlines when pasted from agent output"
---
# Bug 192: Code fences lose newlines when pasted from agent output
## Description
When the assistant pastes a multi-line Rust function using a fenced code block, the second half of the code loses its line breaks and renders as a single long line. This has been reproduced twice in the Matrix chat interface.
## How to Reproduce
1. Ask the assistant to paste a multi-line Rust function in a fenced code block
2. The function `mentions_bot()` from the matrix bot module was used as the test case
3. Observe the rendered output in Matrix
## Actual Result
The first portion of the code block renders with proper newlines, but partway through (around the `let short = format!(...)` line), all remaining lines collapse into a single line with no line breaks.
## Expected Result
The entire code block should render with proper newlines preserved, matching the original source formatting.
## Acceptance Criteria
- [ ] Code fences with multi-line content preserve all newlines when sent through the Matrix bot interface
- [ ] Verify the issue is not a Matrix client rendering bug vs. a message sending bug (inspect the raw message content)