Skip to content

Include HTML headers in ToC #805

Closed
@mrossinek

Description

@mrossinek

Problem Description

When a docstring includes HTML headers (<h1>, etc.) for example when I used an .. include:: some_file.html (or some markdown file which mixes markdown and HTML headers for some reason) directive, those headers are not included in the table of contents.

Proposal

markdown2 already supports this feature: trentm/python-markdown2#538.
All one would need to do, is set header-ids["mixed"] = True for the header-ids extra, which pdoc already uses.

Additional Context

Essentially, I would consider this the reverse of the markdown-in-html setting, which is already supported by pdoc. So I do not see a reason not to support this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions