cvs: phd / build.php

From: Date: Sat, 29 Sep 2007 15:44:25 +0000
Subject: cvs: phd / build.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-95@lists.php.net to get a copy of this message
bjori Sat Sep 29 15:44:25 2007 UTC Modified files: /phd build.php Log: Fix textmaps for PhD formats http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.26&r2=1.27&diff_format=u Index: phd/build.php diff -u phd/build.php:1.26 phd/build.php:1.27 --- phd/build.php:1.26 Sun Sep 16 19:00:26 2007 +++ phd/build.php Sat Sep 29 15:44:25 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: build.php,v 1.26 2007/09/16 19:00:26 bjori Exp $ */ +/* $Id: build.php,v 1.27 2007/09/29 15:44:25 bjori Exp $ */ function err($no, $str, $file, $line) { global $notify; @@ -62,6 +62,7 @@ require "./formats/$output_format.php"; $format = new $classname($IDs); $formatmap = $format->getElementMap(); + $formattextmap = $format->getTextMap(); $themes = $elementmaps = $textmaps = array(); foreach($OPTIONS["output_theme"][$output_format] as $theme => $array) { @@ -196,7 +197,19 @@ } } if (count($skip) < count($themes)) { - $retval = $format->TEXT($value); + $retval = false; + if (isset($formattextmap[$parentname])) { + $tagname = $formattextmap[$parentname]; + if (is_array($tagname)) { + $tagname = $reader->notXPath($tagname, $reader->depth-1); + } + if ($tagname) { + $retval = $format->{$tagname}($value, $tagname); + } + } + if ($retval === false) { + $retval = $format->TEXT($value); + } foreach ($themes as $name => $theme) { if (!in_array($name, $skip)) { $theme->appendData($retval, false);

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