Re: clip to html code text list?
- I had to chuckle at your "I'm lazy" comment Jonathon.. :)
Below is a clip I recently threw together for a project I was working on that does most of what you want..
It doesn't strip the extra spaces or add the beginning and ending <UL> </UL> tags but otherwise it should format your text the way you want providing you only have single line breaks between your list items.
I'm afraid I'm too lazy to alter this to be exactly what you want.. <Grin>
Have a good one
^!Continue This clip places HTML <li></li> tags around each line of text in a document.^%NL%^%NL%If not already done, cancel this clip and create a temp file that has the text you want to format.^%NL%^%NL%Then run this clip again to process the text.^%NL%^%NL%Otherwise press OK to continue now.
^!Replace "^P" >> "</li>^P<li>" ATIWS
--- In ntb-html@y..., "Jonathan Woodbridge" <woodbridge@a...> wrote:
> I'm wondering if anyone has coded a clip to take a text list of this
> kind of format:
> [space space]First item
> [space space]Second item
> [space space]Third item
> or similar list like this:
> * First item
> * Second item
> * Third item
> and transform them into the html coded versions:
> <li>First item</li>
> <li>Second item</li>
> <li>Third item</li>
> It seems like a very common problem. I would do it but I'm lazy and I'm
> sure someone else has already done it...
- John, Hugo:
A triumph for laziness! Thanks for the code, it's going in my toolbox.
> I'm afraid I'm too lazy to alter this to be exactly what you want..that's right! If you had custom coded a long clip I would have felt
guilty. Make them laugh then snatch their code and run, that's what I