Changes the startup status line to only display items that were
actually loaded, instead of showing dots for missing items.
Before: " · README · AGENTS.md ✓ Memory"
After: " ✓ Memory"
Also adds include prompt to the status line when specified:
" ✓ prompt.md ✓ Memory"
The order matches the load order: README → AGENTS.md → include prompt → Memory
When a code block ended without a trailing newline after the closing
\`\`\`, two bugs occurred in flush_incomplete():
1. The closing \`\`\` was included as part of the code block content
(displayed with syntax highlighting)
2. The same \`\`\` was then emitted again as literal text because
current_line was not cleared after being pushed to block_buffer
The fix:
- Check if current_line is the closing fence before adding to block_buffer
- Always clear current_line after processing in the CodeBlock case
Added two tests:
- test_code_fence_after_blank_line: code fence with trailing newline
- test_code_fence_no_trailing_newline: code fence without trailing newline
The format_header() function was not calling format_inline_content()
to process inline formatting like **bold**, *italic*, and `code`
within headers. This caused raw markdown markers to appear in output.
Added 4 tests to verify the fix:
- test_bold_inside_header
- test_italic_inside_header
- test_code_inside_header
- test_mixed_formatting_inside_header
Bug 1: Inline code after list bullets not detected
- After emitting a list bullet, at_line_start was not set to false
- This caused the next backtick to be treated as a potential code fence
- Fixed by setting at_line_start = false after emitting bullet
Bug 2: Code block closing on indented backticks
- Code blocks containing indented ``` (4+ spaces) were closing prematurely
- The .trim() check was too permissive
- Fixed by only allowing closing fence with <= 3 spaces indent (CommonMark spec)
Added tests for both edge cases.