Problem
The writeAdfText ADF renderer in formatter.zig uses an iterative DFS with a stack. When a block-level node (paragraph, heading, list, etc.) has a content array, the code pushes children onto the stack and continues. This skips the block-level newline check that follows, so newlines between paragraphs are never emitted.
In practice, multi-paragraph Jira descriptions render as a single run of text:
First paragraphSecond paragraph
instead of:
First paragraph
Second paragraph
Fix
Added an is_block boolean to each stack frame. When pushing children for a block-level node, is_block is set to true. When a frame is exhausted (all children processed), the newline is emitted if is_block is true. This ensures block boundaries appear after the content, not before.
References
Fixed in PR #7 (commit 1e12dd1). Also affects PRs #8 and #9 which inherit the fix via rebase.
Problem
The
writeAdfTextADF renderer informatter.ziguses an iterative DFS with a stack. When a block-level node (paragraph, heading, list, etc.) has acontentarray, the code pushes children onto the stack andcontinues. This skips the block-level newline check that follows, so newlines between paragraphs are never emitted.In practice, multi-paragraph Jira descriptions render as a single run of text:
instead of:
Fix
Added an
is_blockboolean to each stack frame. When pushing children for a block-level node,is_blockis set totrue. When a frame is exhausted (all children processed), the newline is emitted ifis_blockis true. This ensures block boundaries appear after the content, not before.References
Fixed in PR #7 (commit 1e12dd1). Also affects PRs #8 and #9 which inherit the fix via rebase.