v2.1.0: walk content line-by-line, tracking the H1>H2>H3 stack at each
point. Returns a per-line breadcrumb (joined with " > ") in effect AT
that line — i.e., the heading the line lives under.
Skips heading-style chars inside fenced code blocks (``` and ~~~).
Exported for the v3.11.5-rc.2 inline-span regression test (the fence-toggle
sibling of the rc.1 write-path MED).
v2.1.0: walk content line-by-line, tracking the H1>H2>H3 stack at each point. Returns a per-line breadcrumb (joined with " > ") in effect AT that line — i.e., the heading the line lives under.
Skips heading-style chars inside fenced code blocks (``` and ~~~).
Exported for the v3.11.5-rc.2 inline-span regression test (the fence-toggle sibling of the rc.1 write-path MED).