cvs: phd /themes/php chmsource.php
| From: | Richard Quadling | Date: | Wed, 17 Jun 2009 11:48:30 +0000 |
| Subject: | cvs: phd /themes/php chmsource.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4153@lists.php.net to get a copy of this message | ||
rquadling Wed Jun 17 11:48:30 2009 UTC
Modified files:
/phd/themes/php chmsource.php
Log:
Add title attribute to anchor tags so address can be seen in CHM files for external links.
http://cvs.php.net/viewvc.cgi/phd/themes/php/chmsource.php?r1=1.15&r2=1.16&diff_format=u
Index: phd/themes/php/chmsource.php
diff -u phd/themes/php/chmsource.php:1.15 phd/themes/php/chmsource.php:1.16
--- phd/themes/php/chmsource.php:1.15 Sun Feb 15 19:36:50 2009
+++ phd/themes/php/chmsource.php Wed Jun 17 11:48:30 2009
@@ -1,5 +1,5 @@
<?php
-/* $Id: chmsource.php,v 1.15 2009/02/15 19:36:50 bjori Exp $ */
+/* $Id: chmsource.php,v 1.16 2009/06/17 11:48:30 rquadling Exp $ */
require_once $ROOT . '/themes/php/chunkedhtml.php';
class chmsource extends chunkedhtml {
@@ -380,4 +380,13 @@
return $spaces;
}
+ public function format_link($open, $name, $attrs, $props) {
+ $link = parent::format_link($open, $name, $attrs, $props);
+ // Add title attribute so address can be seen in CHM files.
+ $search = '
<a href="([^"]++)" class="link
external">';
+ $replacement = '<a href="\1" class="link external"
title="Link : \1">';
+ $link = preg_replace($search, $replacement, $link);
+ return $link;
+ }
+
}