Bug 454730 - Markdown back-end not rendering tables if not prefixed by empty line
Summary: Markdown back-end not rendering tables if not prefixed by empty line
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (show other bugs)
Version: 22.04.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-02 09:46 UTC by Andrea Ippolito
Modified: 2022-06-02 09:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
KO without empty line (223.58 KB, image/png)
2022-06-02 09:46 UTC, Andrea Ippolito
Details
OK with empty line (164.05 KB, image/png)
2022-06-02 09:47 UTC, Andrea Ippolito
Details

Note You need to log in before you can comment on or make changes to this bug.
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.