Skip to content

Specify the code language callback Tag contract - #325

Draft
yushuosun wants to merge 1 commit into
matthewwithanm:developfrom
yushuosun:docs/type-code-language-callback-tag
Draft

yushuosun wants to merge 1 commit into
matthewwithanm:developfrom
yushuosun:docs/type-code-language-callback-tag

Conversation

@yushuosun

Copy link
Copy Markdown

The code_language_callback receives an individual Beautiful Soup Tag for each <pre>, not the enclosing document. Document that argument and the code_language fallback on None, and reflect the actual Tag contract in both public type signatures. No converter runtime changes.

Validation: 95 pytest checks passed; project mypy and strict typing fixture passed. In the negative control, a callback accepting only BeautifulSoup was accepted by both old signatures and rejected by both updated signatures. Runtime spot checks (6/6) confirmed the <pre> elements and language fallback. Diff check passed.

Prepared and tested with Codex.

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.

1 participant