cvs: phd /formats xhtml.php
| From: | Christian Weiske | Date: | Sat, 08 Nov 2008 22:51:58 +0000 |
| Subject: | cvs: phd /formats xhtml.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2488@lists.php.net to get a copy of this message | ||
cweiske Sat Nov 8 22:51:58 2008 UTC
Modified files:
/phd/formats xhtml.php
Log:
Merge Nilgün's anchor patch into head and adhere to CS a bit more
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.74&r2=1.75&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.74 phd/formats/xhtml.php:1.75
--- phd/formats/xhtml.php:1.74 Mon Nov 3 07:34:22 2008
+++ phd/formats/xhtml.php Sat Nov 8 22:51:58 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: xhtml.php,v 1.74 2008/11/03 07:34:22 cweiske Exp $ */
+/* $Id: xhtml.php,v 1.75 2008/11/08 22:51:58 cweiske Exp $ */
class XHTMLPhDFormat extends PhDFormat {
protected $elementmap = array( /* {{{ */
@@ -1126,7 +1126,13 @@
}
public function format_admonition($open, $name, $attrs, $props) {
if ($open) {
- return '<div class="'. $name. '">'
.$this->admonition_title($name, $props["lang"]);
+ $idstr = '';
+ if (isset($attrs[PhDReader::XMLNS_XML]['id'])) {
+ $idstr = '<a name="' .
$attrs[PhDReader::XMLNS_XML]['id']
+ . '" id="' . $attrs[PhDReader::XMLNS_XML]['id'] .
'"' . " />\n ";
+ }
+ return $idstr . '<div class="'. $name. '">'
+ . $this->admonition_title($name, $props['lang']);
}
return "</div>";
}