On Wed, 02 Jul 2003 12:53:17 -0700 (PDT), Brion Vibber vibber@aludra.usc.edu gave utterance to the following:
[snip]
But not if the hierarchy is changed, and we would still have to retain the numbering feature for H2 dupes. Also, these anchor names could get very long, especially for H4 anchors.
Yes, all these are reasons why I don't like generating anchor names from header text. :) Whatever you do, they remain fragile. Nice explicit anchors would be better, though of course your fiendish table of contents needs automatic ones anyway, so oh well. :)
Does your current code ensure that anchor names only start with a letter a- z? names starting with a number are illegal, and hyphen and underscore are the only permissible punctuation.