iliaa Thu Jun 30 17:34:54 2005 EDT
Modified files:
/livedocs style_mapping.php
Log:
Fixed bug #33515 (<parameter> inside <literallayout> causes empty <pre>)
http://cvs.php.net/diff.php/livedocs/style_mapping.php?r1=1.29&r2=1.30&ty=u
Index: livedocs/style_mapping.php
diff -u livedocs/style_mapping.php:1.29 livedocs/style_mapping.php:1.30
--- livedocs/style_mapping.php:1.29 Mon Jun 20 21:38:05 2005
+++ livedocs/style_mapping.php Thu Jun 30 17:34:53 2005
@@ -18,7 +18,7 @@
// | Helper functions for formatting elements |
// +----------------------------------------------------------------------+
//
-// $Id: style_mapping.php,v 1.29 2005/06/21 01:38:05 iliaa Exp $
+// $Id: style_mapping.php,v 1.30 2005/06/30 21:34:53 iliaa Exp $
// almost XPATH.. ;-)
$map = array(
@@ -337,9 +337,16 @@
return sprintf('<div class="phpcode"%s>%s</div>', LTR, $tmp);
}
-function format_listing($node)
+function format_listing($node, $map=0)
{
$content = trim($node->content);
+
+ if (!$content && $node->children) {
+ foreach ($node->children as $child) {
+ $content .= $map ? $child->transform($map) :
$child->as_xml();
+ }
+ }
+
if (!strncasecmp($content, '<?php', 5)) {
$node->attributes['role'] = 'php';
}