Skip to content

bug: config property noToc vs noTOC inconsistency #5258

@marcoscaceres

Description

@marcoscaceres

Description

The codebase uses two different capitalizations of the same config property:

  • conf.noToc — used by src/w3c/style.js, src/aom/style.js, src/dini/style.js, src/geonovum/style.js (controls the fixup script injection)
  • conf.noTOC — used by src/core/structure.js (controls actual TOC generation)

Both are declared in src/type-helper.d.ts as separate optional boolean properties.

Impact

A spec author setting noToc: true will suppress the fixup script (style movers) but NOT suppress the TOC itself. Setting noTOC: true will suppress the TOC but not the fixup script. The correct behavior requires both — but the author has no way to know this without reading the source.

Suggested fix

Unify to one property name (noTOC to match the existing documented convention) and add a deprecation warning for the other.

Found by

Adversarial gate holdout test (blind review of PR #5169).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions