[Zope] Structed Text weirdness

John Morton John Morton <jwm@plain.co.nz>
Thu, 8 Mar 2001 11:06:59 +1300 (NZDT)


On Wed, 7 Mar 2001 11:04:38 -0500 (EST) Joel Burton <jburton@scw.org> wrote=
:

> I've been teaching users to use Structured Text for their messages, but
> I've come across a few small annoyances:
>=20
>  . Some items (like links) don't render if there isn't some text after
> them. If the very last part of an STX document is a link, it gets rendere=
d
> as plain text. Added \n after will fix this.

Hadn't spotted that.=20
=20
>  . Items that have 2 linefeeds after them are rendered as a heading, even
> if they are not intended to be. eg """
>=20
> this is text
>=20
>=20
> """
>=20
> comes out as a heading

That's because it looks like a single line paragraph, I think. I always
had difficulty getting the lines I intended to appear as headings working
unless I added a space at the end of the line. I guess the extra new line
counts as that space.=20

So as a rule of thumb - if you want a single line to appear as a heading,
put _two_ white space characters (one of them a new line) between it and=20
the subsequent paragraphs, but if you want a single line paragraph to just
be a paragraph, split the line over two lines.

> . you can't nest things in sensible ways:
>   "**Visit my "site":http://www.site.org.**
>=20
>   is in bold, but loses the link, whereas
>=20
>   "**Visit my "site":http://www.site.org. **
>   isn't in bold (asterisks appear)
>=20
>=20
> I know STX is supposed to be a simple format, and I'm not advocated for
> complicating/changing the rules--but I find the behavior inconsistent
> w/expectations about how things should happen.

The standard documentation for it was lifted out of the structured text
module itself, and hasn't undergone much alteration. Personally I found it
rather confusing.=20
=20
> Are there patches that fix these issues (I haven't seen any)? Are there
> workarounds? Is there a document ("advanced Structured Text") that I coul=
d
> point users to that would suggest workarounds for these problems.

Sounds like it's time for a better document to be written.

John