On Thu, 8 Jan 2009, D'Arcy J.M. Cain wrote:

Some people suggests that this is so close to rst that I should just use
it as if it were, and hand-edit the output for the rare cases where it
doesn't comply.  I don't find this very compelling.

The cases are so rare that I can't remember what they were if any.

http://archives.postgresql.org/pgsql-hackers/2008-08/msg01310.php had Tom's concerns. Since the ReST Grid Tables you're using is built with the characters "-", "=", "|", and "+", those would seem the minimum that would need to be escaped with a \, along with the \ itself, before this would be likely to work with arbitrary table input.

After spending some time assembling a list of special characters, I had an ah-ha moment when I realized they are all listed in the "Sections" section as "section title adornment characters":

! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

Every markup character I found elsewhere shows up in this list, so that seems like the definitive one: escape any character that appears there with a \, and I don't see any obvious cases left that will keep this from being valid ReST output. Shouldn't be a lot of code to add that feature, and then I think most of the criticism of this patch would go away.

I also note that there are some bullet and arrow inputs it will treat as special, see "Bullet Lists" in http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html Seems reasonable to just document that non-ASCII input is somewhat perilious as a known limitation.

--
* Greg Smith gsm...@gregsmith.com http://www.gregsmith.com Baltimore, MD

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to