Skip to content

Document heading extraction in usage examples - #366

Open
ac1982 wants to merge 1 commit into
earwig:mainfrom
ac1982:docs/heading-extraction
Open

ac1982 wants to merge 1 commit into
earwig:mainfrom
ac1982:docs/heading-extraction

Conversation

@ac1982

@ac1982 ac1982 commented Oct 16, 2026

Copy link
Copy Markdown

Add a heading extraction example to the README and matching usage guide, as requested in #298. It shows heading levels, raw title wikitext, and plain text titles. The explanation distinguishes top-level filtering from nested nodes and points to get_sections() for section content.

Fixes #298.

Validation: executed both documentation snippets with the C and Python tokenizers (20 doctest checks), plus nested-heading and empty-selection checks. Full pytest: 2006 passed, 1 skipped. Strict Sphinx builds report the same 216 warnings on the unchanged base and this change, with no new warning messages. Other platforms and Python versions were not tested locally.

Developed and validated with OpenAI Codex.

This branch has not been deployed

No deployments
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.

Request: Add an example of how to get a heading to the readme

1 participant