[Zope] Structured Text Rendering

Chris Withers chrisw@nipltd.com
Tue, 15 Aug 2000 13:47:32 +0100


Hi,

I have a list of string.strip'ped strings which I'd like to render using
structured text.

I'm currently trying:

stx = str(StructuredText.html_with_references(join(storedLines,' \n'),
level=3))

but that isn't working :(

The text in the form submission is:
"""
sdfsdf

 - sdfsdf
 
 - sdfsdf

 - sdfsdf
"""

print join(storedLines,'\n') prints:
"""
sdfsdf

 - sdfsdf

 - sdfsdf

 - sdfsdf
"""

while 'print stx' ,very wierdly shows:
"""
 p>sdfsdf

 - sdfsdf

 - sdfsdf

 - sdfsdf

</p>
"""
(what happened to the < for the <P> ?

and finally, what actually ends up in the HTML source as the result of
this
(which is called by <dtml-var
"render(_.string.split(REQUEST['body'],'\n'),REQUEST.get('encoding','HTML'))">)
is:
"""
<p>sdfsdf
 

 
 - sdfsdf
 
 
 
 - sdfsdf
 

 
 - sdfsdf
 

 
</p>
"""

The questions are:
1) why all the extra newlines in the HTML source?
2) why just the one paragraph beign picked up, instead of 4?
3) why are the '-'s being turned into list items?

cheers,

Chris