diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-05-30 09:43:19 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-05-30 09:43:19 +0000 |
| commit | c4e1d3a161ecee1042fee7c680cc045c7e60eb55 (patch) | |
| tree | 9053f4421c1086df3a003dcf24a9d1c43e13e550 | |
| parent | 083674128a3a83067fa96922409f33b008891af4 (diff) | |
| download | webtrees-c4e1d3a161ecee1042fee7c680cc045c7e60eb55.tar.gz webtrees-c4e1d3a161ecee1042fee7c680cc045c7e60eb55.tar.bz2 webtrees-c4e1d3a161ecee1042fee7c680cc045c7e60eb55.zip | |
Don't split long lines using CONC during editing. We do this during export.
| -rw-r--r-- | includes/functions/functions.php | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/includes/functions/functions.php b/includes/functions/functions.php index 900e3e876b..22a2d83c45 100644 --- a/includes/functions/functions.php +++ b/includes/functions/functions.php @@ -766,46 +766,7 @@ function breakConts($newline) { if ($k>0) { $newlines[$k] = "{$level} CONT ".$newlines[$k]; } - if (strlen($newlines[$k])>255) { - if ($WORD_WRAPPED_NOTES) { - while (strlen($newlines[$k])>255) { - // Make sure this piece ends on a blank, because one blank will be - // added automatically when everything is put back together - $lastBlank = strrpos(substr($newlines[$k], 0, 255), " "); - $thisPiece = rtrim(substr($newlines[$k], 0, $lastBlank+1)); - $newged .= $thisPiece."\n"; - $newlines[$k] = substr($newlines[$k], (strlen($thisPiece)+1)); - $newlines[$k] = "{$level} CONC ".$newlines[$k]; - } - } else { - while (strlen($newlines[$k])>255) { - // Make sure this piece doesn't end on a blank - // (Blanks belong at the start of the next piece) - $thisPiece = rtrim(substr($newlines[$k], 0, 255)); - // Make sure this piece doesn't end in the middle of a UTF-8 character - $nextPieceFirstChar = substr($newlines[$k], strlen($thisPiece), 1); - if (($nextPieceFirstChar&"\xC0") == "\x80") { - // Include all of the UTF-8 character in next piece - while (true) { - // Find the start of the UTF-8 encoded character - $nextPieceFirstChar = substr($thisPiece, -1); - $thisPiece = substr($thisPiece, 0, -1); - if (($nextPieceFirstChar&"\xC0") != "\x80") { - break; - } - } - // Make sure we didn't back up to a blank - $thisPiece = rtrim($thisPiece); - } - $newged .= $thisPiece."\n"; - $newlines[$k] = substr($newlines[$k], strlen($thisPiece)); - $newlines[$k] = "{$level} CONC ".$newlines[$k]; - } - } - $newged .= trim($newlines[$k])."\n"; - } else { - $newged .= trim($newlines[$k])."\n"; - } + $newged .= trim($newlines[$k])."\n"; } return $newged; } |
