Bug 454730

Summary: Markdown back-end not rendering tables if not prefixed by empty line
Product: [Applications] okular Reporter: Andrea Ippolito <andrea.ippo>
Component: markdown backendAssignee: Okular developers <okular-devel>
Status: RESOLVED UPSTREAM    
Severity: normal CC: yurchor
Priority: NOR    
Version: 22.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: KO without empty line
OK with empty line

Description Andrea Ippolito 2022-06-02 09:46:59 UTC
Created attachment 149392 [details]
KO without empty line

SUMMARY
Markdown back-end in Okular does not render a table, if the source MD has a line of text (instead of an empty one) before the line containing the table header.

STEPS TO REPRODUCE
Use the following source:

This is a table:
IP dest.	| Service			| Port ext	| Port int
:---		| :---: 			| ---:		| ---:
192.168.0.2	| homer				| 9010		| 8080

OBSERVED RESULT
Table does not render. Table DOES render if you add an empty line after "This is a table:".

EXPECTED RESULT
Table should render in any case, no matter if an empty line or a line of text comes before it. At least, that's what an MD web renderer does:
https://dillinger.io/

SOFTWARE/OS VERSIONS
0.1.0 version of the MD backend

ADDITIONAL INFORMATION
Screenshots attached
Comment 1 Andrea Ippolito 2022-06-02 09:47:22 UTC
Created attachment 149393 [details]
OK with empty line
Comment 2 Yuri Chornoivan 2022-06-02 09:57:05 UTC
This is how our backend (discount) works. Cf. "discount-mkd2html test.md" with and without the newline.

You can report issues in the discount renderer here:

https://github.com/Orc/discount/issues

Thanks for understanding.