Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki - Mailing list pgsql-hackers

From Jan Michálek
Subject Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Date
Msg-id CAAYBy8btF9CkHDBh0H2OCNQNeZ8e8TZgHPBC=toim9+wMFsMJg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
List pgsql-hackers


2017-04-18 23:06 GMT+02:00 Fabien COELHO <coelho@cri.ensmp.fr>:

Hello,

There are different flavour of markdown, maybe you should document which
one is targetted. Should it be CommonMark? Another variant? Why?

This should be pandoc pipe table. It's because it is similar to aligned
format. I need add this to documentation (i have it in recent TODO)

I still do not understand "why" this variant vs CommonMark or whatever other version.

Because of simply implementation and readability (looks similar to aligned format) and it is comfortable to edit generated table (changing values, aligning columns etc.).
 

ISTM that the md format lacks escaping for special md characters [...] I'd say that you need to do escaping more or less similar to html?

There is problem with markown and newlines. Replacing newline by br was
only solution that I was able to find.

Fine. That does not answer the question about escaping other special md characters.

Sorry, maybe I`m not understanding, there is problems with characters like pipe in cells, pipe should be escaped. What other special markdown characters? Escaping html code in cells?
 

Also, it seems that you use distinct vertical bar characters in the
format? Or is this a trick of my terminal?? It seems that your patch
introduces U+2502 (BOX DRAWINGS LIGHT VERTICAL) instead of the usual pipe
in some places. Maybe you copy-pasted things from the unicode linestyle.

Main of the functionality is used from aligned format. I tested returned
tables in retext and it works. If i have another character than standart
pipe, it shouldn`t work.

Sure. ISTM that you are currently using U+2502 instead of pipe, hence my point.

Could you send me example where?
 

Why are *_newline variants added for length and formatting? Would it be
possible to do without, say by relying on the line count computed by the
standard function for instance?

It`s because newlines in markdown, If I need to do it without copy this
function, i had to add parameter for markdown to this functions.

Then maybe it is an option to consider to avoid duplicating code.

--
Fabien.



--
Jelen
Starší čeledín datovýho chlíva

pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: [HACKERS] Assertion failure in REL9_5_STABLE
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] OK, so culicidae is *still* broken