Menu

#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


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.