cvs: phd(PHD_0_4) /formats xhtml.php
| From: | Hannes Magnusson | Date: | Fri, 02 Jan 2009 12:58:15 +0000 |
| Subject: | cvs: phd(PHD_0_4) /formats xhtml.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2919@lists.php.net to get a copy of this message | ||
bjori Fri Jan 2 12:58:15 2009 UTC
Modified files: (Branch: PHD_0_4)
/phd/formats xhtml.php
Log:
Convert new lines to <br> in screen sections (unless its CDATA)
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.67.2.2.2.13&r2=1.67.2.2.2.14&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.67.2.2.2.13 phd/formats/xhtml.php:1.67.2.2.2.14
--- phd/formats/xhtml.php:1.67.2.2.2.13 Thu Jan 1 23:59:36 2009
+++ phd/formats/xhtml.php Fri Jan 2 12:58:14 2009
@@ -1,5 +1,5 @@
<?php
-/* $Id: xhtml.php,v 1.67.2.2.2.13 2009/01/01 23:59:36 bjori Exp $ */
+/* $Id: xhtml.php,v 1.67.2.2.2.14 2009/01/02 12:58:14 bjori Exp $ */
class XHTMLPhDFormat extends PhDFormat {
protected $elementmap = array( /* {{{ */
@@ -295,6 +295,7 @@
'shortaffil' => 'format_suppressed_text',
'titleabbrev' => 'format_suppressed_text',
'programlisting' => 'format_programlisting_text',
+ 'screen' => 'format_screen_text',
'alt' => 'format_alt_text',
'modifier' => array(
/* DEFAULT */ false,
@@ -1136,6 +1137,9 @@
}
return '</div>';
}
+ public function format_screen_text($value, $tag) {
+ return nl2br($value);
+ }
public function format_constant($open, $name, $attrs) {
if ($open) {
return "<b><tt class=\"constant\">";