D-Programming-Language/dlang.org — pull request #618 by JakobOvrum (2014-07-22 16:34:53+00:00)
Title: Normalize anchor names

This is for #497, discussed in [this thread](http://forum.dlang.org/thread/srqvufwxkqguaijwgnuo@forum.dlang.org).

To recap, before deploying public links to our anchor names, we should unify their format. Once that is done, I will reopen #497.

The lowercase + hyphen separator style was chosen because it's used by Github, as well as the websites of Rust, Ruby and Python; it seems to be the most prevalent style. The changes are of course applied by a script, so it's easy to change if anyone has any objections.

In the thread, Walter suggested the anchor name should match the section text. Assuming that means the section header text, this is problematic, as spaces are technically not allowed in anchor names (and they look ugly in links because spaces need URL encoding).

It was also suggested that legacy names should be provided. I disagree with this for four reasons: 1) there's no way to specify which is the primary name, so search engines may end up providing links to the old names, and 2) the anchor names were rarely obtainable without delving into the source code, thus only search engines really propagated them, and 3) we can assume that search engines will automatically start using the new names within a reasonably short time, and 4) it's a maintenance cost with dubious benefits for an already messy codebase.

Also, anchor names must begin with an ASCII alphabetic letter, which some of our names violate (`#__gshared` and `#__func__`). These have been changed in a separate commit.