Commit 01f9a9ec authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add indenting to td, th elements

parent 151d7dd0
......@@ -98,8 +98,8 @@ class HtmltoText {
$this->newlines = 2;
}
private $indentfirstchar = array('bq' => '> ', 'list' => '- ', 'dd' => ' ');
private $indentchar = array('bq' => '> ', 'list' => ' ', 'dd' => ' ');
private $indentfirstchar = array('bq' => '> ', 'list' => '- ', 'dd' => ' ', 'td' => ' ');
private $indentchar = array('bq' => '> ', 'list' => ' ', 'dd' => ' ', 'td' => ' ');
private function output($str, $wrap=true) {
if ($this->newlines) {
......@@ -251,11 +251,15 @@ class HtmltoText {
case 'table': case 'tr':
$this->para();
$this->process_children($node);
$this->para();
break;
case 'td':
case 'td': case 'th':
$this->newline();
$this->indent[] = 'td';
$this->process_children($node);
$this->newline();
array_pop($this->indent);
break;
case 'pre':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment