Repository navigation
🐛 FIX: Preserve falsey parsers in CLI helpers - #455
Open
Quinnod345 wants to merge 1 commit into
Open
Quinnod345 wants to merge 1 commit into
Quinnod345 wants to merge 1 commit into
Conversation
Only create the default parser when the optional argument is None. Retain supplied instances and their configured rules for stdin, files and interactive input. Ordinary main() behavior is unchanged. Add three exact-output regressions, helper docstrings and a changelog entry. All three regressions fail on the pinned upstream driver. CPython 3.13.11/macOS: 20 CLI tests and 1,035 full-suite tests pass; pre-commit --all-files, including Mypy, passes.
This branch has not been deployed
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.
Passing a valid
MarkdownItsubclass with a false truth value to the direct CLI helpers discards its configuration. A parser with table rules enabled renders a table directly, butconvert_stdin,convert_fileandinteractivereplace it and render a paragraph.Create the default parser only when
md is None. Add exact-output regressions for all three helpers and document the selection rule in their docstrings and the changelog.main()already creates an ordinary truthy parser; the reproduced case concerns callers supplying a parser directly.Validation on CPython 3.13.11/macOS:
6f58654in an isolated source copy before the repair.pre-commit run --all-filespasses every applicable hook, including Mypy.I maintain Ponder. Its review surfaced the parser replacement; the three added regressions reproduce it.