#15 redundant space in html2text

open
nobody
None
5
2009-03-19
2009-03-19
Erel Segal
No

in html2text.inc, function addWordToLine, change the relevant section to:

...
if ($prevLine != "") {
if ($toAdd && !preg_match("/\s$/",$toAdd)) // add space only if needed - if $toAdd does not end in whitespace
$prevLine .= " ";
} else {
$prevLine = $this->getIndentation($word === $this->TOKEN_AFTERLI);
}
...

Discussion