Hi, STX doesn't do punctuation properly. When given text like this: this is a "link":something. that STX is supposed to give: this is a <a href="something">link<a>. that But, I get: this is a <a href="something.">link</a> that This happens with all punctuation (period, comma, etc.) Mine is a stock Python 2.1 + Zope 2.6.0 installation (on Debian 3.0 tracking "testing"). I have checked the sources under lib/python/StructuredText and they seem to be using the correct regexes. I also ran the regression tests and they all passed. In particular, the "HTML regression test" passed without any problems. However, when I render a document on the actual Zope instance, I get the above problem. Any ideas on how to fix them? - Is it something to do with the regex libraries (either python libraries or system regex libraries)? - Is it something to do with what classes (or types) of the StructuredText module are being used in a "Document"? - Has anyone else experienced this? There are a couple of other problems also: - STX doesn't strip the indentation from code samples. I.e., after a paragraph which ends with "::", I have a code sample. The code sample has to be indented deeper than the preceding paragraph for it to be recognized. But, when rendering, the indentation is preserved, causing all the lines of the code to be deeply indented. I thought it was supposed to strip the leading whitespace (atleast upto the minimum indentation). - Tables are formed like so: |---| |a|b| ... Whereas, the documentation says, we must use "||" (which doesn't work). Thanks! Sreeram. -- [http://sreeram.org/cookies.php] mittsquinter, adj: A ballplayer who looks into his glove after missing the ball, as if, somehow, the cause of the error lies there. -- "Sniglets", Rich Hall & Friends
--On Mittwoch, 20. November 2002 15:11 +0800 Ramachandran Sreeram <gro.mareers@sreeram.org> wrote:
Hi,
STX doesn't do punctuation properly.
When given text like this: this is a "link":something. that STX is supposed to give: this is a <a href="something">link<a>. that But, I get: this is a <a href="something.">link</a> that
This happens with all punctuation (period, comma, etc.)
Mine is a stock Python 2.1 + Zope 2.6.0 installation (on Debian 3.0 tracking "testing").
I have checked the sources under lib/python/StructuredText and they seem to be using the correct regexes.
I also ran the regression tests and they all passed. In particular, the "HTML regression test" passed without any problems.
However, when I render a document on the actual Zope instance, I get the above problem.
To be short: STXNG is a mess and fixing bugs on one side raise bugs on the other side. Feel free to submit a collector issue or even better a patch that fixes the problem.
Any ideas on how to fix them?
- Is it something to do with the regex libraries (either python libraries or system regex libraries)?
Hell, yes.
- Is it something to do with what classes (or types) of the StructuredText module are being used in a "Document"?
The standard DocumentClass.
- Has anyone else experienced this?
There are a couple of other problems also:
- STX doesn't strip the indentation from code samples. I.e., after a paragraph which ends with "::", I have a code sample. The code sample has to be indented deeper than the preceding paragraph for it to be recognized. But, when rendering, the indentation is preserved, causing all the lines of the code to be deeply indented. I thought it was supposed to strip the leading whitespace (atleast upto the minimum indentation).
Maybe a regex problem as well...
- Tables are formed like so: |---| |a|b|
Check out the example file in the regression folder of STXNG. Sorry, this mail was not very helpful but STXNG is some kind of a nightmare. As an alternative you should have a look at the integration of reStructuredText into Zope (currently on the ajung-restructuredtext-integration-branch in the CVS). I think about providing some patches to make reST available for Zope 2.6. -aj --------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
Earlier, Andreas Jung responded:
--On Mittwoch, 20. November 2002 15:11 +0800 Ramachandran Sreeram <gro.mareers@sreeram.org> wrote:
Hi,
STX doesn't do punctuation properly.
When given text like ...
[ much stuff deleted ]
Sorry, this mail was not very helpful but STXNG is some kind of a nightmare. As an alternative you should have a look at the integration of reStructuredText into Zope (currently on the ajung-restructuredtext-integration-branch in the CVS). I think about providing some patches to make reST available for Zope 2.6.
Andreas, I, for one, would find this very useful. reST seems like a definite improvement. Haven't looked at what's in the CVS. Is it much work to get reST integrated into 2.6? Will reST be the default in 2.7 or 3? Thanks for considering this effort.
-aj
--------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
-- Tim Lynch tlynch@nal.usda.gov
--On Mittwoch, 20. November 2002 12:31 -0500 Tim Lynch <lynch@gould.mannlib.cornell.edu> wrote:
Earlier, Andreas Jung responded:
--On Mittwoch, 20. November 2002 15:11 +0800 Ramachandran Sreeram <gro.mareers@sreeram.org> wrote:
Hi,
STX doesn't do punctuation properly.
When given text like ...
[ much stuff deleted ]
Sorry, this mail was not very helpful but STXNG is some kind of a nightmare. As an alternative you should have a look at the integration of reStructuredText into Zope (currently on the ajung-restructuredtext-integration-branch in the CVS). I think about providing some patches to make reST available for Zope 2.6.
Haven't looked at what's in the CVS. Is it much work to get reST integrated into 2.6? Will reST be the default in 2.7 or 3?
There is also the reStructuredText product from Richard Jones available. I am thinking about an integration for 2.6 since it will not go into the 2.6 branch as new feature but it is proposed as additional module for 2.7. But I can't speak for Zope 3. -aj
participants (3)
-
Andreas Jung -
Ramachandran Sreeram -
Tim Lynch