[Zope] Structured Text Rendering and \r

Chris Withers chrisw@nipltd.com
Wed, 16 Aug 2000 10:00:03 +0100


Dieter Maurer wrote:
> Chris Withers writes:
>  > I have a list of string.strip'ped strings which I'd like to render using
>                     !!!!!!!!!!!!

Erk, they weren't actully being stripped, I meant what was supposed to
the happening was \r\n and \n\r were both supposed to be replaced by \n,
but the regular expression to do that was broken and so wasn't
working...

> 2) why just the one paragraph beign picked up, instead of 4?
> You said, the list consists of "strip"ped strings?
> Structured text uses indentation and newlines to
> determine paragraphs and their nesting.

Found the problem. Due to the dodgy regular expression, some of the
lines I was joining had \r's in them.
Apparently, \r's interact badly with the Structured Text paragraph
detecter, which matches \n(some spaces)\n
I'll go comment on that in the StructuredTextNG wiki...

>  > 3) why are the '-'s being turned into list items?
> This is what structured text should do:
> a paragraph (!) starting with '-' or '*' is turned into
> a list item.
> Because, however, no paragraphs are recognized, I would
> not expect to see list items.

Gak.. I meant "why are the '-'s _not_ being turned into list items?" :S

The reason was 'cos none of the paragraph seperations were being picked
up...

sorry for the confusion...

Chris