Skip to content

🐛 FIX: Handle generator rule names across parser chains - #447

Merged
chrisjsewell merged 7 commits into
executablebooks:masterfrom
muneikh:fix-generator-rule-names
Nov 9, 2026
Merged

chrisjsewell merged 7 commits into
executablebooks:masterfrom
muneikh:fix-generator-rule-names

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

MarkdownIt.enable() and disable() accept iterables, but a generator is exhausted by the first rule chain. Later block and inline rules silently receive no names, and unknown-rule validation is skipped.

Materialize names once so all four chains and validation inspect the same input. Keep string names and chainable return behavior. Add six regressions covering each operation, names across all chains, unknown-rule errors, and ignored unknown names; update the docstring and changelog.

Validation: all 1038 tests pass in the prescribed Python 3.13 Tox session. All pinned pre-commit hooks pass, including strict Mypy.

@chrisjsewell
chrisjsewell merged commit a852307 into executablebooks:master Nov 9, 2026
15 checks passed
@chrisjsewell

Copy link
Copy Markdown
Member

Merged in a852307, thanks @muneikh, nice catch! Before merging I merged master in, dropped the changelog line (we write the changelog at release time), made the disable docstring say "iterable of rule names" like enable, and folded the six wrapper tests into three tests parametrized on enable/disable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants