| @@ 444-451 (lines=8) @@ | ||
| 441 | // If the current word is surrounded by {unwrap} tags we'll |
|
| 442 | // strip the entire chunk and replace it with a marker. |
|
| 443 | $unwrap = array(); |
|
| 444 | if (preg_match_all('|\{unwrap\}(.+?)\{/unwrap\}|s', $str, $matches)) |
|
| 445 | { |
|
| 446 | for ($i = 0, $c = count($matches[0]); $i < $c; $i++) |
|
| 447 | { |
|
| 448 | $unwrap[] = $matches[1][$i]; |
|
| 449 | $str = str_replace($matches[0][$i], '{{unwrapped'.$i.'}}', $str); |
|
| 450 | } |
|
| 451 | } |
|
| 452 | ||
| 453 | // Use PHP's native function to do the initial wordwrap. |
|
| 454 | // We set the cut flag to FALSE so that any individual words that are |
|
| @@ 1193-1200 (lines=8) @@ | ||
| 1190 | // If the current word is surrounded by {unwrap} tags we'll |
|
| 1191 | // strip the entire chunk and replace it with a marker. |
|
| 1192 | $unwrap = array(); |
|
| 1193 | if (preg_match_all('|\{unwrap\}(.+?)\{/unwrap\}|s', $str, $matches)) |
|
| 1194 | { |
|
| 1195 | for ($i = 0, $c = count($matches[0]); $i < $c; $i++) |
|
| 1196 | { |
|
| 1197 | $unwrap[] = $matches[1][$i]; |
|
| 1198 | $str = str_replace($matches[0][$i], '{{unwrapped'.$i.'}}', $str); |
|
| 1199 | } |
|
| 1200 | } |
|
| 1201 | ||
| 1202 | // Use PHP's native function to do the initial wordwrap. |
|
| 1203 | // We set the cut flag to FALSE so that any individual words that are |
|