Skip to content

Sub-subsection indentation renders as code blocks on GitHub #36

@v1d0b0t

Description

@v1d0b0t

Problem

Nested subsections below the top level (clauses, sub-clauses) use whitespace indentation instead of bold labels. GitHub treats 4-space indented text as code blocks.

Current output

  (G)

    (i) is an alien (other than an alien lawfully admitted...
    (ii) acts for or on behalf of...

  (H) has been discharged from the Armed Services...

GitHub renders (i) and (ii) as code blocks because of the 4-space indent.

Expected output

**(G)**

**(i)** is an alien (other than an alien lawfully admitted...

**(ii)** acts for or on behalf of...

**(H)** has been discharged from the Armed Services...

All nesting levels should use bold labels with blank line separation, same as top-level subsections **(a)**, **(b)**, etc.

Affected files

Widespread — any section with deep nesting. Examples:

  • title-18/chapter-010-biological-weapons.md — § 175b(d)(2)(G)(i)-(ii)
  • title-18/chapter-044-firearms.md — § 921(a)(4)(A)(i)-(ii), destructive devices list

Root cause

src/transforms/markdown.ts or src/transforms/uslm-to-ir.ts — the renderer applies bold label formatting to top-level subsections (a/b/c) but uses raw indentation for deeper levels (A/B/C, i/ii/iii, I/II/III).

Related

Follow-up to #31 (formatting round 2) which fixed top-level subsection rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions