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

From Fabien COELHO
Subject Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Date
Msg-id alpine.DEB.2.20.1704190601240.32504@lancre
Whole thread Raw
In response to Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki  (Jan Michálek <godzilalalala@gmail.com>)
Responses Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
List pgsql-hackers
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.

>> 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.

>> 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.

>> 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.



pgsql-hackers by date:

Previous
From: Keith Fiske
Date:
Subject: Re: [HACKERS] Passing values to a dynamic background worker
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Continuous buildfarm failures on hamster with bin-check