Repository navigation
fix(content): keep the blank line after an indented code block - #79
Merged
Merged
Conversation
An indented code block was followed directly by the next paragraph: the blank line between them disappeared. The indented code path jumps to the next source line before the tracking at the end of the loop, so the blank line in front of the block still counted as the last line rendered, and the one after it was collapsed as a duplicate. The path now records the code line itself. Co-Authored-By: Claude Opus 5.5 (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 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.
An indented code block was followed directly by the next paragraph: the blank line between them disappeared.
Before: code line After.rendered as
Before:/ blank /code line/After..Cause
The indented code path ends with
goto continue, which skips the tracking at the end of the render loop. The blank line in front of the block stayed recorded as the last line rendered, so the blank line after the block was collapsed as a second blank in a row.Change
The indented code path now records the code line itself (
prev_rendered_blank = false,prev_was_heading = false).Tests
tests/indented_code_test.lua: one-line and multi-line blocks keep the blank line after them. Both assertions fail without the change.make testand stylua.🤖 Generated with Claude Code