Re: Markdown format output for psql, design notes

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Markdown format output for psql, design notes
Дата
Msg-id 7b92d4f6-c454-4fd7-8158-3d8b44be3b27@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Markdown format output for psql, design notes  (Lætitia Avrot <laetitia.avrot@gmail.com>)
Ответы Re: Markdown format output for psql, design notes  (Lætitia Avrot <laetitia.avrot@gmail.com>)
Список pgsql-hackers
    Lætitia Avrot wrote:

> I suppose you mean in the standard output when the screen is too short to
> print the whole line ?
> Because if the output is redirected to a file (with `\o myfile` for
> example), the line end naturally when the row ends.

No I meant independently of the screen, if there's an LF character
in a cell. Or a '|' character, since that's the same problem: an
element of structure happening to be in the contents.
The specs mentioned upthread don't seem to give any indication
about that being supported.

Say we have:
 SELECT E'foo\nbar' as "Header1", 'foo|bar' as "Header2"

If the markdown output was produced for the sole purpose of being
converted to HTML in the end, which is often the case, it would work
to use HTML entities in the output, for instance:

Header1|Header2
---|---
foo<br>bar|foo|bar

This piece seems to be properly processed and rendered by markdown
processors I can try (pandoc, grip, github).

But then we'd also need to convert < > and & in the original contents
to the equivalent HTML entities, and that would really be
markdown-for-html instead of just markdown, I guess.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Configuring messages language on Windows
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [HACKERS] WIP: long transactions on hot standby feedback replica/ proof of concept