for ( n = hlvl; n <= 6; n++ ) { sec = sec (HL[n]?"</section>":""); }
HL[hlvl]++; for ( n = hlvl + 1; n <= 6; n++) { HL[n] = 0;}
- hid = HL[1]; for ( n = 2; n <= hlvl; n++) { hid = hid "." HL[n] ; }
+ hid = ""; for ( n = 2; n <= blvl; n++) { hid = hid BL[n] "/"; }
+ hid = hid HL[1]; for ( n = 2; n <= hlvl; n++) { hid = hid "." HL[n] ; }
# hid = hid ":" URL(htxt, 1);
hstack = gensub( /^(.* )?([0-9]+( [0-9]+){5})$/, "\\1" ,"1", hstack) \
}
# Nested Block, resets heading counters
-function _nblock( block, LOCAL, hlsav, sec ) {
+function _nblock( block, LOCAL, hlsav, sec, n ) {
hlsav = hstack;
hstack = hstack " 0 0 0 0 0 0";
# Block Level
- blvl++;
+ blvl++; BL[blvl]++;
+ for ( n = blvl + 1; n in BL; n++) { delete BL[n]; }
block = _block( block );
split( gensub( /^(.* )?([0-9]+( [0-9]+){5})$/, "\\2" ,"1", hstack), HL);