cvs: phd(PHD_0_4) / package.xml /formats xhtml.php
| From: | Hannes Magnusson | Date: | Sun, 28 Dec 2008 16:20:18 +0000 |
| Subject: | cvs: phd(PHD_0_4) / package.xml /formats xhtml.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2854@lists.php.net to get a copy of this message | ||
bjori Sun Dec 28 16:20:18 2008 UTC
Modified files: (Branch: PHD_0_4)
/phd package.xml
/phd/formats xhtml.php
Log:
Automatically add fragments for refsect roles
# function.strpos.php#function.strpos.description
# function.strpos.php#function.strpos.seealso
# function.strpos.php#function.strpos.examples etc.
http://cvs.php.net/viewvc.cgi/phd/package.xml?r1=1.74.2.19.2.26&r2=1.74.2.19.2.27&diff_format=u
Index: phd/package.xml
diff -u phd/package.xml:1.74.2.19.2.26 phd/package.xml:1.74.2.19.2.27
--- phd/package.xml:1.74.2.19.2.26 Sat Dec 27 22:18:55 2008
+++ phd/package.xml Sun Dec 28 16:20:18 2008
@@ -52,6 +52,7 @@
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD
Style</license>
<notes>
+ - Automatically add anchors for refsect roles. (Hannes)
- Fixed bug#46941 (FR: Find broken links). (Hannes)
- Fixed bug#46931 (wrong order of the META tag in the HEAD element). (Chen Gang)
- Fixed bug#46714 (change deprecated ereg_replace(Since PHP 5.3.0) to preg_replace). (Chen
Gang)
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.67.2.2.2.7&r2=1.67.2.2.2.8&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.67.2.2.2.7 phd/formats/xhtml.php:1.67.2.2.2.8
--- phd/formats/xhtml.php:1.67.2.2.2.7 Thu Dec 18 20:28:20 2008
+++ phd/formats/xhtml.php Sun Dec 28 16:20:18 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: xhtml.php,v 1.67.2.2.2.7 2008/12/18 20:28:20 bjori Exp $ */
+/* $Id: xhtml.php,v 1.67.2.2.2.8 2008/12/28 16:20:18 bjori Exp $ */
class XHTMLPhDFormat extends PhDFormat {
protected $elementmap = array( /* {{{ */
@@ -397,6 +397,7 @@
),
"tablefootnotes" => array(
),
+ "chunk_id" => null,
);
public function __construct(array $IDs) {
@@ -636,6 +637,7 @@
if ($name === "refentry") {
//$class .= " -rel-posting";
}
+ $this->cchunk["chunk_id"] =
$attrs[PhDReader::XMLNS_XML]["id"];
return '<div id="' .$attrs[PhDReader::XMLNS_XML]["id"].
'" class="' .$class. '">';
}
return '<div class="' .$name. '">';
@@ -676,7 +678,7 @@
$attrs[PhDReader::XMLNS_DOCBOOK]["role"] = "unknown";
}
$this->role = $role = $attrs[PhDReader::XMLNS_DOCBOOK]["role"];
- return '<div class="' .$name.' ' .$role.
'">';
+ return '<a name="' .$this->cchunk["chunk_id"].
'.' .$role. '"></a><div class="' .$name.' '
.$role. '">';
}
$this->role = null;
return "</div>\n";