Skip to content

fix(tableofcontents): Cast options.level to integer for TOC entry#2360

Open
leorosa wants to merge 1 commit into
sile-typesetter:masterfrom
leorosa:master
Open

fix(tableofcontents): Cast options.level to integer for TOC entry#2360
leorosa wants to merge 1 commit into
sile-typesetter:masterfrom
leorosa:master

Conversation

@leorosa

@leorosa leorosa commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

When using the tableofcontents package, calling \tocentry[level=1]{title} stores the level number as a string instead of a number in the TOC file. Then, calling \tableofcontents crashes the document parsing.

This PR allows the package to work according to the indicated in documentation.

When using the `tableofcontents` package, calling `tocentry[level=1]{title}` stores the level number as a string instead of a number in the TOC file.
Then, calling `\tableofcontents` crashes the document parsing.

This PR allows the package to work according to the indicated in documentation.
@leorosa
leorosa requested a review from alerque as a code owner February 6, 2026 20:31
@Omikhleia Omikhleia added this to the v0.15.14 milestone Feb 6, 2026
@Omikhleia

Copy link
Copy Markdown
Member

Good catch. (Same issue too in my own resilient.tableofcontents variant, but I never had the need to call \tocentry from SIL scripts)

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