This page demonstrates a bug with the Table of Contents. When you click on the section title in the TOC, you should be able to jump to that section. This appears to be done with a hashing algorithm on the section title. However, if the section title has extra leading or trailing spaces, then the algorithm will include those spaces for the hash in one case, and not in the other, thus the TOC link and the header id will not match.

You can test it by clicking the links below, but you have to look at the page source to see the different hashes.

Table of Contents

Here is some vertical space



















Good Section Header

This is a good section header - there is only one space at the end of the title (see Raw view to confirm)










Header with Trailing Space

This is a bad section header. [[TableOfContents]] will create a bad link to it, because there is an additional space at the end of the header (you need to look at the page source to see it)










Header with Leading Space

This is a bad section header. [[TableOfContents]] will create a bad link to it, because there is an additional space at the start of the header (you need to look at the page source to see it)











Another Good Section

Again, no extra spaces, so this is a good header section, and jumping will work.













MoinMoin: MoinMoinBugs/TableOfContentsBreakOnExtraSpaces/Test (last edited 2007-10-29 19:13:44 by localhost)