in reply to highlight and line breaks
Add your markup first. Then use something like the following to add your "linebreaks" (which I gather are newlines from reading your problem description):
That will allow you to treat your markup tags as a single character when trying to decide where to put your newlines. You may need the /s modifier to deal with existing newlines.s!((?:<span>|</span>|.){80})!$1\n!g;
Edit: Fixed thinko. I meant /s rather than /m of course.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: highlight and line breaks
by glwtta (Hermit) on Jan 16, 2003 at 01:21 UTC | |
by sauoq (Abbot) on Jan 16, 2003 at 02:24 UTC | |
by Aristotle (Chancellor) on Jan 16, 2003 at 09:12 UTC | |
by bbfu (Curate) on Jan 16, 2003 at 07:30 UTC | |
by sauoq (Abbot) on Jan 16, 2003 at 08:42 UTC | |
by bbfu (Curate) on Jan 16, 2003 at 18:07 UTC |