cvs: phd / build.php /formats xhtml.php /include PhDFormat.class.php

From: Date: Tue, 02 Oct 2007 14:37:42 +0000
Subject: cvs: phd / build.php /formats xhtml.php /include PhDFormat.class.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-127@lists.php.net to get a copy of this message
bjori Tue Oct 2 14:37:42 2007 UTC Modified files: /phd build.php /phd/formats xhtml.php /phd/include PhDFormat.class.php Log: - Fixed non-closing b element for empty <title />s (reported by Joshua Thompson and Philip Olson) - Check if we have an open "{" before we print "}" - Fixed variablelist titles http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.30&r2=1.31&diff_format=u Index: phd/build.php diff -u phd/build.php:1.30 phd/build.php:1.31 --- phd/build.php:1.30 Tue Oct 2 10:10:09 2007 +++ phd/build.php Tue Oct 2 14:37:41 2007 @@ -1,6 +1,6 @@ #!@php_bin@ <?php -/* $Id: build.php,v 1.30 2007/10/02 10:10:09 bjori Exp $ */ +/* $Id: build.php,v 1.31 2007/10/02 14:37:41 bjori Exp $ */ function err($no, $str, $file, $line) { global $notify; @@ -139,7 +139,7 @@ } if ($tag) { if (strncmp($tag, "format_", 7)) { - $retval = $themes[$theme]->transformFromMap($open, $tag, $nodename); + $retval = $themes[$theme]->transformFromMap($open, $tag, $nodename, $props); if ($retval !== false) { $themes[$theme]->appendData($retval, $isChunk); $skip[] = $theme; @@ -165,7 +165,7 @@ $tag = $reader->notXPath($tag); } if (strncmp($tag, "format_", 7)) { - $retval = $format->transformFromMap($open, $tag, $nodename); + $retval = $format->transformFromMap($open, $tag, $nodename, $props); foreach($themes as $name => $theme) { if (!in_array($name, $skip)) { $theme->appendData($retval, $isChunk); http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.33&r2=1.34&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.33 phd/formats/xhtml.php:1.34 --- phd/formats/xhtml.php:1.33 Mon Oct 1 13:48:52 2007 +++ phd/formats/xhtml.php Tue Oct 2 14:37:42 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.33 2007/10/01 13:48:52 bjori Exp $ */ +/* $Id: xhtml.php,v 1.34 2007/10/02 14:37:42 bjori Exp $ */ class XHTMLPhDFormat extends PhDFormat { protected $elementmap = array( /* {{{ */ @@ -213,6 +213,7 @@ 'sect3' => 'h4', 'segmentedlist' => 'strong', 'table' => 'format_bold_paragraph', + 'variablelist' => 'strong', ), 'type' => 'span', 'userinput' => 'format_userinput', @@ -253,9 +254,9 @@ } return "<font color='red' size='+3'>/{$args[1]}</font>"; } - public function transformFromMap($open, $tag, $name) { + public function transformFromMap($open, $tag, $name, $props) { if ($open) { - return sprintf('<%s class="%s">', $tag, $name); + return sprintf('<%s class="%s"%s>', $tag, $name, $props["empty"] ? " /" : ""); } return "</$tag>"; } @@ -357,6 +358,7 @@ if (isset($attrs[PhDReader::XMLNS_DOCBOOK]["role"]) && $attrs[PhDReader::XMLNS_DOCBOOK]["role"] == "comment") { return ' */</div>'; } + $this->tmp["classsynopsisinfo"]["close"] = true; return ' {</div>'; } @@ -365,7 +367,11 @@ return '<div class="'.$name.'">'; } - return "}</div>"; + if (isset($this->tmp["classsynopsisinfo"]) && isset($this->tmp["classsynopsisinfo"]["close"]) && $this->tmp["classsynopsisinfo"]["close"]) { + $this->tmp["classsynopsisinfo"]["close"] = false; + return "}</div>"; + } + return "</div>"; } public function format_fieldsynopsis($open, $name, $attrs) { if ($open) { @@ -621,7 +627,10 @@ } return '</b>'; } - public function format_bold_paragraph($open, $name, $attrs) { + public function format_bold_paragraph($open, $name, $attrs, $props) { + if ($props["empty"]) { + return ""; + } if ($open) { return "<p><b>"; } http://cvs.php.net/viewvc.cgi/phd/include/PhDFormat.class.php?r1=1.6&r2=1.7&diff_format=u Index: phd/include/PhDFormat.class.php diff -u phd/include/PhDFormat.class.php:1.6 phd/include/PhDFormat.class.php:1.7 --- phd/include/PhDFormat.class.php:1.6 Sat Aug 11 16:42:07 2007 +++ phd/include/PhDFormat.class.php Tue Oct 2 14:37:42 2007 @@ -1,11 +1,11 @@ <?php -/* $Id: PhDFormat.class.php,v 1.6 2007/08/11 16:42:07 bjori Exp $ */ +/* $Id: PhDFormat.class.php,v 1.7 2007/10/02 14:37:42 bjori Exp $ */ abstract class PhDFormat extends PhDHelper { private $TABLE = array(); /* abstract functions */ - abstract public function transformFromMap($open, $tag, $name); + abstract public function transformFromMap($open, $tag, $name, $props); abstract public function CDATA($data); abstract public function TEXT($data); abstract public function __call($func, $args);

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