summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bb97739)
TODO: look at lines which are longer then the editor size and and theirfor
do not reach the code responsable for the smart wrapping of short lines.
Those lines should also be tested on first words.
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7665
7612ce4b-ef26-0410-bec9-
ea0150e637f0
* Set this to false to stop appending short strings to previous lines
*/
$smartwrap = true;
* Set this to false to stop appending short strings to previous lines
*/
$smartwrap = true;
// inner loop, (obviously) handles wrapping up to
// the next newline
while ($pos < $nextNewline) {
// inner loop, (obviously) handles wrapping up to
// the next newline
while ($pos < $nextNewline) {
while (($pos < $nextNewline) && (ctype_space ($body{$pos}))) {
$pos++;
}
while (($pos < $nextNewline) && (ctype_space ($body{$pos}))) {
$pos++;
}
// if this is a short line then just append it and continue outer loop
if (($outStringCol + $nextNewline - $pos) <= ($wrap - $citeLevel - 1) ) {
// if this is the final line in the input string then include
// if this is a short line then just append it and continue outer loop
if (($outStringCol + $nextNewline - $pos) <= ($wrap - $citeLevel - 1) ) {
// if this is the final line in the input string then include
while (($lastRealChar > $pos && $lastRealChar < $length) && (ctype_space ($body{$lastRealChar}))) {
$lastRealChar--;
}
while (($lastRealChar > $pos && $lastRealChar < $length) && (ctype_space ($body{$lastRealChar}))) {
$lastRealChar--;
}
// decide if appending the short string is what we want
if (($nextNewline < $length && $body{$nextNewline} == "\n") &&
isset($lastRealChar)) {
// decide if appending the short string is what we want
if (($nextNewline < $length && $body{$nextNewline} == "\n") &&
isset($lastRealChar)) {
-
- //check the first word:
- $mypos = $nextNewline+1;
+ $mypos = $pos;
+ //check the first word:
while (($mypos < $length) && ($body{$mypos} == '>')) {
$mypos++;
// skip over any spaces interleaved among the cite markers
while (($mypos < $length) && ($body{$mypos} == '>')) {
$mypos++;
// skip over any spaces interleaved among the cite markers
while (($mypos < $length) && ($body{$mypos} == ' ')) {
$mypos++;
}
while (($mypos < $length) && ($body{$mypos} == ' ')) {
$mypos++;
}
*/
$firstword = substr($body,$mypos,strpos($body,' ',$mypos) - $mypos);
*/
$firstword = substr($body,$mypos,strpos($body,' ',$mypos) - $mypos);
//if ($dowrap || $ldnspacecnt > 1 || ($firstword && (
if (!$smartwrap || $firstword && (
$firstword{0} == '-' ||
//if ($dowrap || $ldnspacecnt > 1 || ($firstword && (
if (!$smartwrap || $firstword && (
$firstword{0} == '-' ||