| | |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcube_message.php | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2008-2010, RoundCube Dev. - Switzerland | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2008-2010, Roundcube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | $q = strlen(str_replace(' ', '', $regs[0])); |
| | | $line = substr($line, strlen($regs[0])); |
| | | |
| | | if ($q == $q_level && isset($text[$last]) |
| | | if ($q == $q_level && $line |
| | | && isset($text[$last]) |
| | | && $text[$last][strlen($text[$last])-1] == ' ' |
| | | ) { |
| | | $text[$last] .= $line; |
| | |
| | | // remove space-stuffing |
| | | $line = preg_replace('/^\s/', '', $line); |
| | | |
| | | if (isset($text[$last]) |
| | | if (isset($text[$last]) && $line |
| | | && $text[$last] != '-- ' |
| | | && $text[$last][strlen($text[$last])-1] == ' ' |
| | | ) { |
| | |
| | | $line = rtrim(substr($line, $level)); |
| | | $line = $prefix . rc_wordwrap($line, $length - $level - 2, " \r\n$prefix "); |
| | | } |
| | | else { |
| | | else if ($line) { |
| | | $line = ' ' . rc_wordwrap(rtrim($line), $length - 2, " \r\n "); |
| | | } |
| | | |