Skip to content

Commit

Permalink
left nav module links corrected to used the cleansed module name [fix…
Browse files Browse the repository at this point in the history
…es #2173322].
  • Loading branch information
Adam Moore committed Jul 6, 2009
1 parent c438238 commit f95e78e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions bin/yuidoc_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def _mkdir(newdir):
self.modules = d[MODULES]
self.modulenames = self.modules.keys()
self.modulenames.sort(lambda x,y: cmp(x.lower(), y.lower()))
self.cleansedmodulenames = {}

for mod in self.modulenames:
self.cleansedmodulenames[mod] = self.cleanseStr(mod)

self.cleansedmodulename = self.cleanseStr(self.modulename)

Expand Down Expand Up @@ -127,6 +131,7 @@ def assignGlobalProperties(template):
template.version = self.version
template.modules = self.modules
template.modulenames = self.modulenames
template.cleansedmodulenames = self.cleansedmodulenames
template.modulename = self.modulename
template.moduletitle = self.moduletitle
template.cleansedmodulename = self.cleansedmodulename
Expand Down
3 changes: 2 additions & 1 deletion template/main.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@
#if $moduledef == $modulename
#set $css = "selected"
#end if
<li class="$css"><a href="module_${moduledef}.html" title="$moduledef">$moduledef</a></li>
#set $cleansedname = $cleansedmodulenames[$moduledef]
<li class="$css"><a href="${cleansedname}.html" title="$moduledef">$moduledef</a></li>
#end for
</ul>
</div>
Expand Down
3 changes: 2 additions & 1 deletion test/lang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ yuidoc_home=..
# $src/node \
# $src/queue \
# $src/yui"
#parser_in="$src"

# parser_in="lang"
parser_in="lang/java lang/python lang/perl lang/ruby"

# The location to output the parser data. This output is a file containing a
Expand Down
2 changes: 1 addition & 1 deletion test/lang/cs/test.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
/**
* C# Module Description
* @module csharp
* @module lang.csharp
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion test/lang/java/test.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Test Java Module Description
* @module javatest
* @module lang.javatest
*/
import java.util.*;

Expand Down
2 changes: 1 addition & 1 deletion test/lang/perl/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=begin
/**
* Test Perl File
* @module perltest
* @module lang.perltest
*/
=cut
use strict;
Expand Down
2 changes: 1 addition & 1 deletion test/lang/php/test.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* General Module description for PHPTest
* @module phptest
* @module lang.phptest
*/


Expand Down
2 changes: 1 addition & 1 deletion test/lang/ruby/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
=begin
/**
* Module Info for test Ruby File
* @module rubytest
* @module lang.rubytest
*/
=end

Expand Down

0 comments on commit f95e78e

Please sign in to comment.