[quote=“agibsonsw”]I said I would publish this Wednesday - I meant Thursday, the weekend has thrown out my calendar?!
Having split the text into numbered items (li’s) I realise I should also have split the view content into lines as well. This has several advantages:
I wouldn’t need a complex process to find, and remove, the ‘\n’ newline characters;
A simple if, or else, would determine that there was a completely blank line;
The likelihood of an empty span would be much reduced;
A nice generator function could process each span;
The file could be written-to one line at a time.
Also, perhaps, the spans’ text and colours could be kept in a temporary list of tuples, and then HTML-encoded, etc., in one shot (per line), before being written to the file.
I know it works *great *as it is, but I think it might be worth the effort to redraft. I shall consider, and perhaps tackle, this tomorrow. Andy.[/quote]
I felt the same way with using ol/li. So I threw them out of mine. I process each line of the view separately. I now have complete control of explicitly setting line numbers and even controlling style (no dot after gutter number, etc.)
I also wrapped the whole thing in a pre to better preserve format better.
I put each line in a table row to keep prevent ugly wrap when you copy and paste the HTML to an email.
I also keep the background color on copy and paste.
I want to add an option to support highlighting showing selection highlights…I spent too much time on this last night…I need to put this down…
I blame you @agibsonsw, why did you have to post this plugin .