Re: Other formats in pset like markdown, rst, mediawiki

From: Jan Michálek <godzilalalala(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Other formats in pset like markdown, rst, mediawiki
Date: 2017-04-19 06:15:29
Message-ID: CAAYBy8btF9CkHDBh0H2OCNQNeZ8e8TZgHPBC=toim9+wMFsMJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-04-18 23:06 GMT+02:00 Fabien COELHO <coelho(at)cri(dot)ensmp(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-04-19 06:19:38 Re: OK, so culicidae is *still* broken
Previous Message Pavan Deolasee 2017-04-19 05:51:35 Re: Assertion failure in REL9_5_STABLE