[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-womb] gnumaint gm
From: |
Karl Berry |
Subject: |
[commit-womb] gnumaint gm |
Date: |
Sun, 07 Aug 2011 23:34:46 +0000 |
CVSROOT: /sources/womb
Module name: gnumaint
Changes by: Karl Berry <karl> 11/08/07 23:34:46
Modified files:
. : gm
Log message:
id for each package
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnumaint/gm?cvsroot=womb&r1=1.42&r2=1.43
Patches:
Index: gm
===================================================================
RCS file: /sources/womb/gnumaint/gm,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- gm 7 Aug 2011 23:23:17 -0000 1.42
+++ gm 7 Aug 2011 23:34:45 -0000 1.43
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: gm,v 1.42 2011/08/07 23:23:17 karl Exp $
+# $Id: gm,v 1.43 2011/08/07 23:34:45 karl Exp $
# GNU maintainer-related operations.
#
# Copyright 2007, 2008, 2009, 2010, 2011 Free Software Foundation Inc.
@@ -323,7 +323,11 @@
# start building output string for this package.
# first column is the package name and additional manuals.
- my $str = qq!\n<tr><td>* !;
+ # Add an id for each package for easy linking;
+ # but XHTML, as usual, introduces gratuitious problems.
+ (my $xhtml_id = $pkgname) =~ s/[^-_0-9a-z]//g; # identifier chars
+ $xhtml_id = "pkg_$xhtml_id" if $xhtml_id !~ /^[a-z]/; # start w/letter
+ my $str = qq!\n<tr id="$xhtml_id"><td>* !;
# the main package identifier and its doc url. If we have a
# mundane name, use it. Otherwise, prettify the pkg identifier.
@@ -339,7 +343,7 @@
for my $manual (keys %doc_urls) {
next if $manual eq $pkgname; # already took care of that
push (@more_manuals,
- sprintf (qq!<a href="%s">$manual</a>!, $doc_url_xhtml));
+ sprintf (qq!<a href="%s">$manual</a>!, $doc_urls{$manual}));
}
if (@more_manuals) {
$str .= "\n<small>(";
@@ -440,7 +444,7 @@
# distinct, too.
#
if ($manual eq $pkgname && exists $ret{$pkgname}) {
- $ret{"$manual<!-- -->"} = $htmlxref{$manual}
+ $ret{"$manual<!-- again -->"} = $htmlxref{$manual}
} else {
# otherwise, take what we are given.
$ret{$manual} = $htmlxref{$manual};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [commit-womb] gnumaint gm,
Karl Berry <=