noties / Markwon

Android markdown library (no WebView)
https://noties.io/Markwon/
Apache License 2.0
2.74k stars 309 forks source link

Tables do not render when no blank line is above them #350

Open stefan-niedermann opened 3 years ago

stefan-niedermann commented 3 years ago

Markwon version: 4.6.2 and current master

Expected behavior: Table renders with and without blank line before it Actual behavior: Table rendering requires a blank line before it

I haven't found something related to the expected behavior in the commonmark-specification, but it looks like GitHub and Nextcloud Deck (Web UI) are handling it as expected.

Those screenshots have been made with the sample-app of your current master branch:

Without blank line: without_spacing

With blank line: with

noties commented 3 years ago

Hello @stefan-niedermann ,

it might be that tables extension wrongfully parses tables when table does not begin the markdown block, but instead is contained in another block (in your first example - paragraph). Unfortunately our code bases are out of sync, so it is not possible to check this behavior with latest version of commonmark-java. I will try to expedite the migration to the latest version