Skip to content
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

Tables and dividers don't render properly #99

Open
1 task
kenyee opened this issue Jan 5, 2024 · 5 comments · Fixed by #104
Open
1 task

Tables and dividers don't render properly #99

kenyee opened this issue Jan 5, 2024 · 5 comments · Fixed by #104
Labels

Comments

@kenyee
Copy link

kenyee commented Jan 5, 2024

About this issue

This doesn't seem to render hrules/divider or tables properly..otherwise, it works great!

Example markdown:

--------------------------------------------------------------------------
A/B Test Cells (All) number is percentage of crashes with user in test cell:
----------------------------------------------------------------------------

|Test ID|Cell|% users|
|-------|----|-------
| 55977 | 6 | 15% |
| 55085 | 4 | 14% |
| 56835 | 10 | 13% |
| 57360 | 9 | 12% |

The hrule/divider makes the text within get rendered at a very large size. And the table doesn't show up:
Screenshot 2024-01-05 at 10 28 56 AM

I checked the IntelliJ library that this library uses and it appears to support tables so I'm guessing this library doesn't handle them? If so, it should be documented in the Readme.md.

Details

  • [ 0.10.0 ] Used library version
  • [ Compose Multiplatform 1.5.11 ] Used platform
  • [ N/A ] Used support library version
  • [ 8.5 ] Used gradle build tools version
  • [ Iguana ] Used tooling / Android Studio version
  •  Other used libraries, potential conflicting libraries

Checklist

@mikepenz
Copy link
Owner

Thank you very much for the report @kenyee

You can find all current handled node types here:
https://github.com/mikepenz/multiplatform-markdown-renderer/blob/develop/multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/compose/Markdown.kt#L86-L106

And yes you are correct, tables are currently not yet handled. It is however possible to implement a custom component which adds support for these.

That said, I am happy to review contributions adding proper table support to the library!


Related the hrule/divider. yes the divider on top is not shown, however the line below the text would make it a header. Which based on your screenshot looks correct. See the markdown example below:

h1

h2


A/B Test Cells (All) number is percentage of crashes with user in test cell:

@salah-8
Copy link

salah-8 commented Oct 12, 2024

@mikepenz I don't see a table node type in the markdown library. Can you explain more how would someone implement a custom component for it?

@mikepenz
Copy link
Owner

@salah-8
Copy link

salah-8 commented Oct 15, 2024

@mikepenz But I couldn't find a "table" type in the Kotlin markdown library in the first place to handle it here.

@mikepenz
Copy link
Owner

These might only be in the GFM flavored spec: https://github.com/JetBrains/markdown/blob/master/src/commonMain/kotlin/org/intellij/markdown/flavours/gfm/GFMElementTypes.kt#L32-L38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants