Bug: Quote block parsing breaks on empty continuation lines#858
Conversation
Multi-line quote blocks were incorrectly being split when they contained empty continuation lines (just `>` without a trailing space). The parser only matched `"> "` (with space) but not `">"` alone. Fixed in both `prepare_nodes_from_markdown` (batch import) and `parse_markdown` (update operations) by: 1. Also matching lines that equal exactly `">"` when starting a quote block 2. Continuing to collect quote lines that are either `"> ..."` or just `">` Added 3 test cases: - Multi-line quote with empty continuation line (issue example) - Quote starting with empty line (edge case) - Production example from testing guide document Closes #855 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code Review: PR #858 - Bug: Quote block parsing breaks on empty continuation linesReview Type: Initial Review Requirements Check (Issue #855)
Note on migration criterion: The fourth acceptance criterion mentions re-importing affected documents. This is a data-level fix that would need to be done manually or via a separate migration script. The code fix itself is complete. This should either be:
Code Review Findings✅ No Critical IssuesThe fix is straightforward, correct, and well-tested. 🟡 Important: Missing Test Coverage for
|
malibio
left a comment
There was a problem hiding this comment.
Review completed. See detailed review comment above. Recommendation: APPROVE - the fix is correct, well-implemented, and adequately tested.
- Add test for handle_update_root_from_markdown path (parse_markdown) to ensure both code paths are covered for issue #855 fix - Improve assertion precision in existing test: verify line count and specific empty continuation pattern instead of weak contains(">") Addresses reviewer recommendations from PR #858. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Review Feedback Addressed ✅All reviewer recommendations have been implemented: ✅ Addressed (2/2)
⏭️ Skipped: NoneAll recommendations were reasonable and valuable improvements. Summary
Addressed by: Claude Opus 4.5 |
* Fix quote block parsing to handle empty continuation lines (#855) Multi-line quote blocks were incorrectly being split when they contained empty continuation lines (just `>` without a trailing space). The parser only matched `"> "` (with space) but not `">"` alone. Fixed in both `prepare_nodes_from_markdown` (batch import) and `parse_markdown` (update operations) by: 1. Also matching lines that equal exactly `">"` when starting a quote block 2. Continuing to collect quote lines that are either `"> ..."` or just `">` Added 3 test cases: - Multi-line quote with empty continuation line (issue example) - Quote starting with empty line (edge case) - Production example from testing guide document Closes #855 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address review: Improve test coverage for quote block fix - Add test for handle_update_root_from_markdown path (parse_markdown) to ensure both code paths are covered for issue #855 fix - Improve assertion precision in existing test: verify line count and specific empty continuation pattern instead of weak contains(">") Addresses reviewer recommendations from PR #858. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fix quote block parsing to handle empty continuation lines (#855) Multi-line quote blocks were incorrectly being split when they contained empty continuation lines (just `>` without a trailing space). The parser only matched `"> "` (with space) but not `">"` alone. Fixed in both `prepare_nodes_from_markdown` (batch import) and `parse_markdown` (update operations) by: 1. Also matching lines that equal exactly `">"` when starting a quote block 2. Continuing to collect quote lines that are either `"> ..."` or just `">` Added 3 test cases: - Multi-line quote with empty continuation line (issue example) - Quote starting with empty line (edge case) - Production example from testing guide document Closes #855 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address review: Improve test coverage for quote block fix - Add test for handle_update_root_from_markdown path (parse_markdown) to ensure both code paths are covered for issue #855 fix - Improve assertion precision in existing test: verify line count and specific empty continuation pattern instead of weak contains(">") Addresses reviewer recommendations from PR #858. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fix quote block parsing to handle empty continuation lines (#855) Multi-line quote blocks were incorrectly being split when they contained empty continuation lines (just `>` without a trailing space). The parser only matched `"> "` (with space) but not `">"` alone. Fixed in both `prepare_nodes_from_markdown` (batch import) and `parse_markdown` (update operations) by: 1. Also matching lines that equal exactly `">"` when starting a quote block 2. Continuing to collect quote lines that are either `"> ..."` or just `">` Added 3 test cases: - Multi-line quote with empty continuation line (issue example) - Quote starting with empty line (edge case) - Production example from testing guide document Closes #855 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address review: Improve test coverage for quote block fix - Add test for handle_update_root_from_markdown path (parse_markdown) to ensure both code paths are covered for issue #855 fix - Improve assertion precision in existing test: verify line count and specific empty continuation pattern instead of weak contains(">") Addresses reviewer recommendations from PR #858. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Closes #855