Skip to content

Tables only render if preceded by a blank newline #1694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Pab0 opened this issue Oct 5, 2024 · 3 comments
Closed

Tables only render if preceded by a blank newline #1694

Pab0 opened this issue Oct 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Pab0
Copy link

Pab0 commented Oct 5, 2024

Jerboa Version

0.0.77-gplay

Android Version + Phone

Android 13

Describe The Bug

A Markdown (GFM-extension) table that is not preceded by a newline is rendering fine on the Lemmy website, but not on Jerboa.
There is a relevant issue in Markwon here: noties/Markwon#350


For example on https://lemmy.world/post/20511191, the first table renders fine but the other two don't:

  1. Markdown source:
$4:

| Game | Steam Link |
|-----------|------------|
| Windowkill | https://store.steampowered.com/app/2726450/Windowkill/ |
| RUINER | https://store.steampowered.com/app/464060/RUINER/ |
| LONE RUIN | https://store.steampowered.com/app/1452070/LONE_RUIN/ |

$10: All above, plus:
| Game | Steam Link |
|-----------|------------|
| OTXO | https://store.steampowered.com/app/1608640/OTXO/ |
| Go Mecha Ball | https://store.steampowered.com/app/2008510/Go_Mecha_Ball/ |

$12: All above, plus:
| Game | Steam Link |
|-----------|------------|
| The Ascent - Cyber Edition | https://store.steampowered.com/bundle/27166/Cyber_Edition_Bundle/ |
| The Last Stand: Aftermath | https://store.steampowered.com/app/1266840/The_Last_Stand_Aftermath/ |
  1. Rendering on Lemmy website:
    image

  2. But rendering in Jerboa:
    no_table

To Reproduce

  1. Create a new post
  2. Insert a Markdown (GFM) table directly after a non-blank line, e.g.
A table:
| col1 | col2 |
|-----------|------------|
| foo | foo2 |
| bar | bar2 |
| baz | baz2 |
  1. Publish the post, or just click on "Preview"
  2. The table won't render in HTML.

In the case of a crash or when relevant include the logs

No response

@Pab0 Pab0 added the bug Something isn't working label Oct 5, 2024
@MV-GH
Copy link
Collaborator

MV-GH commented Oct 6, 2024

This should be fixed in the markdown library. At most we can add a "hack" for this. But the library is dead so that is unlikely to happen.

More push for #1663

@Pab0
Copy link
Author

Pab0 commented Oct 6, 2024

Indeed a more active markdown library would be good for any such issues in the future.

Based on this comment, multiplatform-markdown-renderer seems to not support tables yet, although adding them as a custom component might work transitionally, until they're added to the library.

@dessalines
Copy link
Member

Yes, this should be handled by whatever markdown library, not here. I'm also fairly certain that commonmark should require a newline for tables anyway.

@dessalines dessalines closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants