|
@@ -49,12 +49,13 @@
|
|
// you do character translation.
|
|
// you do character translation.
|
|
// Specifically, ' comes up as 5 characters instead of 1.
|
|
// Specifically, ' comes up as 5 characters instead of 1.
|
|
function sqWordWrap(&$line, $wrap) {
|
|
function sqWordWrap(&$line, $wrap) {
|
|
- preg_match("/^([\s>]+)([^\s>].*)/", $line, $regs);
|
|
|
|
|
|
+ preg_match("/^([\s>]*)([^\s>].*)$/", $line, $regs);
|
|
$beginning_spaces = $regs[1];
|
|
$beginning_spaces = $regs[1];
|
|
$words = explode(" ", $regs[2]);
|
|
$words = explode(" ", $regs[2]);
|
|
|
|
|
|
$i = 0;
|
|
$i = 0;
|
|
$line = $beginning_spaces;
|
|
$line = $beginning_spaces;
|
|
|
|
+
|
|
if (count($words) > 1) {
|
|
if (count($words) > 1) {
|
|
while ($i < count($words)) {
|
|
while ($i < count($words)) {
|
|
// Force one word to be on a line (minimum)
|
|
// Force one word to be on a line (minimum)
|