From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Thom Brown <thom(at)linux(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Szymon Guz <mabewlun(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: printing table in asciidoc with psql |
Date: | 2015-03-31 21:06:49 |
Message-ID: | 20150331210649.GH4466@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 31, 2015 at 05:25:48PM +0100, Thom Brown wrote:
> Slightly updated patch attached and applied. I moved asciidoc after
> HTML in the list, rather than at the end. Thanks for everyone's hard
> work on this.
>
>
> I think I done gone broke it:
>
> CREATE TABLE "| 3^.||moo|hello," (stuff int, "|&.^hje||" text);
>
> INSERT INTO "| 3^.||moo|hello," VALUES (2,'hello');
>
> Output:
>
> [options="header",cols=">l,<l",frame="none"]
> |====
> ^l|stuff ^l|\|&.^hje\|\|
> |2 |hello
> |====
Uh, you broke asciidoctor 1.5.2. ;-) LOL
I installed the Asciidoctor Firefox plugin:
https://addons.mozilla.org/en-US/firefox/addon/asciidoctorjs-live-preview/
and was able to see that asciidoctor sucks in the next row's first cell value
when the _heading_ ends with an escaped pipe, e.g. this:
[options="header",cols=">l,<l",frame="none"]
|====
^l|stuff ^l|abc\|X
|2 |hello\|
|3 |hello
|====
yields a correct HTML heading of:
stuff abc|X
which is good, but if you remove the "X" from the asciidoc heading, the
HTML output heading is:
stuff abc|2
The "X" is gone, but the "2" from the first data row is now in the
heading, and the first and only data row is now:
hello|3 hello
I can't add a trailing pipe to the header line because it breaks output
in https://asciidoclive.com/ .
I have reported this on the asciidoc discussion list:
http://discuss.asciidoctor.org/Problem-with-table-heading-ending-in-a-pipe-td2902.html
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-03-31 21:43:51 | Re: Exposing PG_VERSION_NUM in pg_config |
Previous Message | Tom Lane | 2015-03-31 20:48:18 | Re: How about to have relnamespace and relrole? |