Fix output block closing fence when content lacks trailing newline#32
Open
vorou wants to merge 1 commit into
Open
Fix output block closing fence when content lacks trailing newline#32vorou wants to merge 1 commit into
vorou wants to merge 1 commit into
Conversation
Commands like `printf "hello"` produce output without a trailing newline, causing the closing ``` fence to land on the same line as the output and breaking the resulting markdown. Co-Authored-By: Claude Opus 4.6 <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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
All the following is generated by CC, but I've read it, and it makes sense to me. Built and tested locally too!
Summary
printf "hello"produce output without a trailing newline, causing the closingfence to land on the same line as the output (`hello), breaking the resulting markdown\nTestWriteOutputNoTrailingNewlinetest caseReproduction
Before:
hello```(broken markdown)After:
Test plan
go test ./...— all existing tests passTestWriteOutputNoTrailingNewlinecovers the fixprintf "hello"produces valid markdown🤖 Generated with Claude Code