fix: unify markdown/html export code path, add tests and CLI choices#63
Merged
Conversation
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.
Summary
Follow-up to #62 addressing gaps found during review.
batch.py:--no-tui --output-format markdown/htmlsilently fell through to CSV — batch had its own_write_outputthat didn't know about the new formats. Fixed by extractingwrite_rows_to_fd()fromoperations.pyas the single shared implementation for all format logic, and having bothwrite_buffer_to_fdand batch delegate to it. Removed_write_outputentirely.cli.py: Addedmarkdownandhtmlto--output-formatchoices (they were missing, so argparse would reject them)._infer_output_formatassertions for.md/.markdown/.html, plustest_write_markdown_outputandtest_write_html_outputasync round-trip tests, and CLI flag tests.age|with no leading space) is fixed as a side-effect of the refactor.