svn: /phd/trunk/phpdotnet/phd/ Format/Abstract/Manpage.php Package/Generic/Manpage.php
| From: | Hannes Magnusson | Date: | Sun, 25 Apr 2010 12:10:57 +0000 |
| Subject: | svn: /phd/trunk/phpdotnet/phd/ Format/Abstract/Manpage.php Package/Generic/Manpage.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6450@lists.php.net to get a copy of this message | ||
bjori Sun, 25 Apr 2010 12:10:57 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298495
Log:
- Remove trimming and new line on every new text section
- Add new lines around macros that need it
- Add extra new line between table rows
- Add space after <member> entries
Changed paths:
U phd/trunk/phpdotnet/phd/Format/Abstract/Manpage.php
U phd/trunk/phpdotnet/phd/Package/Generic/Manpage.php
Modified: phd/trunk/phpdotnet/phd/Format/Abstract/Manpage.php
===================================================================
--- phd/trunk/phpdotnet/phd/Format/Abstract/Manpage.php 2010-04-25 11:58:46 UTC (rev 298494)
+++ phd/trunk/phpdotnet/phd/Format/Abstract/Manpage.php 2010-04-25 12:10:57 UTC (rev 298495)
@@ -20,7 +20,7 @@
}
public function TEXT($str) {
- $ret = trim(preg_replace( '/[ \n\t]+/', ' ', $str));
+ $ret = preg_replace( '/[ \n\t]+/', ' ', $str);
// Escape \ ' and NUL byte
$ret = addcslashes($ret, "\\'\0");
@@ -30,7 +30,7 @@
return $ret;
}
- return "\n" . $ret;
+ return $ret;
}
public function transformFromMap($open, $tag, $name, $attrs, $props) {
Modified: phd/trunk/phpdotnet/phd/Package/Generic/Manpage.php
===================================================================
--- phd/trunk/phpdotnet/phd/Package/Generic/Manpage.php 2010-04-25 11:58:46 UTC (rev 298494)
+++ phd/trunk/phpdotnet/phd/Package/Generic/Manpage.php 2010-04-25 12:10:57 UTC (rev 298495)
@@ -307,15 +307,15 @@
}
public function format_function_text($value, $tag) {
- return "\n\\fB" . $this->toValidName($value) . "\\fP(3)";
+ return "\\fB" . $this->toValidName($value) . "\\fP(3)";
}
public function format_parameter_text($value, $tag) {
- return "\n\\fI" . ((isset($value[0]) && $value[0] == "$") ?
"" : "$") . $value . "\\fP";
+ return "\\fI" . ((isset($value[0]) && $value[0] == "$") ?
"" : "$") . $value . "\\fP";
}
public function format_parameter_term_text($value, $tag) {
- return "\n\\fI$" . $value . "\\fP\n\-";
+ return "\\fI$" . $value . "\\fP\n\-";
}
public function format_term($open, $name, $attrs, $props) {
@@ -346,13 +346,18 @@
if ($this->cchunk["firstitem"]) {
$ret = "";
$this->cchunk["firstitem"] = false;
- } else $ret = ",";
+ } else {
+ $ret = ", ";
+ }
return $ret;
}
+
if ($this->cchunk["firstitem"]) {
$ret = "\n.TP 0.2i\n\\(bu";
$this->cchunk["firstitem"] = false;
- } else $ret = "\n.TP 0.2i\n\\(bu";
+ } else {
+ $ret = "\n.TP 0.2i\n\\(bu";
+ }
return $ret;
}
return "";
@@ -360,23 +365,23 @@
public function format_admonition($open, $name, $attrs, $props) {
if ($open) {
- return "\n.PP\n\\fB" . $this->autogen($name, $props["lang"]) .
"\\fR\n.RS";
+ return "\n.PP\n\\fB" . $this->autogen($name, $props["lang"]) .
"\\fR\n.RS\n";
}
- return "\n.RE\n.PP";
+ return "\n.RE\n.PP\n";
}
public function format_example($open, $name, $attrs, $props) {
if ($open && isset($this->cchunk["examplenumber"])) {
- return "\n.PP\n\\fB" . $this->autogen($name, $props["lang"]) .
++$this->cchunk["examplenumber"] . "\\fR\n.RS";
+ return "\n.PP\n\\fB" . $this->autogen($name, $props["lang"]) .
++$this->cchunk["examplenumber"] . "\\fR\n.RS\n";
}
- return "\n.RE";
+ return "\n.RE\n";
}
public function format_itemizedlist($open, $name, $attrs, $props) {
if ($open) {
- return "\n.PP\n.RS";
+ return "\n.PP\n.RS\n";
}
- return "\n.RE\n.PP";
+ return "\n.RE\n.PP\n";
}
public function format_methodparam($open, $name, $attrs, $props) {
@@ -481,7 +486,7 @@
public function format_xref($open, $name, $attrs, $props) {
if ($props['empty'])
- return "\n\"" .
Format::getShortDescription($attrs[Reader::XMLNS_DOCBOOK]["linkend"]) .
"\"";
+ return "\"" .
Format::getShortDescription($attrs[Reader::XMLNS_DOCBOOK]["linkend"]) .
"\"";
return "";
}
@@ -499,7 +504,7 @@
}
public function format_verbatim_text($value, $tag) {
- return "\n" . trim($value) . "\n";
+ return trim($value);
}
public function format_refsect($open, $name, $attrs, $props) {
@@ -528,7 +533,7 @@
$ret .= ".";
return $ret;
}
- return "\n.TE\n.PP";
+ return "\n.TE\n.PP\n";
}
public function format_thead($open, $name, $attrs, $props) {
@@ -554,12 +559,12 @@
}
return "|T{\n";
}
- return "\nT}";
+ return "\n\nT}";
}
public function format_segmentedlist($open, $name, $attrs, $props) {
if ($open) {
- return "\n.P";
+ return "\n.P\n";
}
$this->cchunk["segtitle"] = array();
return "\n";
@@ -600,13 +605,13 @@
public function format_indent($open, $name, $attrs, $props) {
if ($open) {
- return "\n.PP\n.RS";
+ return "\n.PP\n.RS\n";
}
- return "\n.RE\n.PP";
+ return "\n.RE\n.PP\n";
}
public function format_tag_text($value, $tag) {
- return "\n<" . $value . ">";
+ return "<" . $value . ">";
}
// Convert the function name to a Unix valid filename
@@ -616,7 +621,7 @@
public function format_mediaobject($open, $name, $attrs, $props) {
if ($open) {
- return "\n\\fB" . $this->autogen($name, $props["lang"]) .
"\\fP";
+ return "\\fB" . $this->autogen($name, $props["lang"]) .
"\\fP";
}
return "";
}