MINOR Making anchors more readable and predictable by using lowercase only

This commit is contained in:
Ingo Schommer 2011-01-15 21:47:43 +00:00
parent e571b5973f
commit 089c844892
2 changed files with 8 additions and 7 deletions

View File

@ -235,6 +235,7 @@ class DocumentationParser {
$t = ereg_replace('[^A-Za-z0-9]+','-',$t);
$t = ereg_replace('-+','-',$t);
$t = trim($t, '-');
$t = strtolower($t);
return $t;
}

View File

@ -104,14 +104,14 @@ HTML;
*/
$this->assertContains('# Heading one {#Heading-one}', $result);
$this->assertContains('# Heading one {#heading-one}', $result);
$this->assertContains('# Heading with custom anchor {#custom-anchor}', $result);
$this->assertNotContains('# Heading with custom anchor {#custom-anchor} {#Heading', $result);
$this->assertContains('# Heading two {#Heading-two}', $result);
$this->assertContains('# Heading three {#Heading-three}', $result);
$this->assertContains('## Heading duplicate {#Heading-duplicate}', $result);
$this->assertContains('## Heading duplicate {#Heading-duplicate-2}', $result);
$this->assertContains('## Heading duplicate {#Heading-duplicate-3}', $result);
$this->assertNotContains('# Heading with custom anchor {#custom-anchor} {#heading', $result);
$this->assertContains('# Heading two {#heading-two}', $result);
$this->assertContains('# Heading three {#heading-three}', $result);
$this->assertContains('## Heading duplicate {#heading-duplicate}', $result);
$this->assertContains('## Heading duplicate {#heading-duplicate-2}', $result);
$this->assertContains('## Heading duplicate {#heading-duplicate-3}', $result);
}