Skip to content

toc_formatter - restructure helper functions for getting contents of table #55

@hughdingb58

Description

@hughdingb58

Right now, the process of producing the array of entries containing {list numbering, link id, indentation level, entry content} is split into two functions, get_toc_table_listnum and get_toc_table_prev_indent, and only one of them is called depending on how the table of contents indentation is generated.

This splitting of the process feels pretty arbitrary, especially since get_toc_table_prev_indent is itself divided into two completely independent actions (depending on whether p_br or ul_li is used). If possible, it would make things more maintainable to restructure the code more clearly.

Be sure to update the readme with any changes made here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions