cvs: phd(PHD_0_4) /formats xhtml.php

From: Date: Sat, 08 Nov 2008 21:55:46 +0000
Subject: cvs: phd(PHD_0_4) /formats xhtml.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2487@lists.php.net to get a copy of this message
nilgun Sat Nov 8 21:55:46 2008 UTC Modified files: (Branch: PHD_0_4) /phd/formats xhtml.php Log: add anchor for caution, important, note, tip and  warning tags http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.67.2.2.2.2&r2=1.67.2.2.2.3&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.67.2.2.2.2 phd/formats/xhtml.php:1.67.2.2.2.3 --- phd/formats/xhtml.php:1.67.2.2.2.2 Fri Nov 7 22:52:01 2008 +++ phd/formats/xhtml.php Sat Nov 8 21:55:46 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.67.2.2.2.2 2008/11/07 22:52:01 cweiske Exp $ */ +/* $Id: xhtml.php,v 1.67.2.2.2.3 2008/11/08 21:55:46 nilgun Exp $ */ class XHTMLPhDFormat extends PhDFormat { protected $elementmap = array( /* {{{ */ @@ -1126,7 +1126,11 @@ } 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>"; }

« previous php.doc.cvs (#2487) next »