From 1c98faf8a687d70a65695b2a93df4174a1f5b5db Mon Sep 17 00:00:00 2001 From: Omer Strulovich Date: Thu, 9 Apr 2026 16:52:50 -0400 Subject: [PATCH] Add RTL table behavior preview Co-authored-by: Codex --- .../sample/RtlCompatibilityBehaviorSample.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/android-sample/src/main/java/com/zachklipp/richtext/sample/RtlCompatibilityBehaviorSample.kt b/android-sample/src/main/java/com/zachklipp/richtext/sample/RtlCompatibilityBehaviorSample.kt index f0d7a51c..952a2c93 100644 --- a/android-sample/src/main/java/com/zachklipp/richtext/sample/RtlCompatibilityBehaviorSample.kt +++ b/android-sample/src/main/java/com/zachklipp/richtext/sample/RtlCompatibilityBehaviorSample.kt @@ -94,6 +94,19 @@ private fun DocumentWidthBehaviorPreview() { } } +@Preview(name = "RTL table behavior · he-IL", locale = "he-rIL", widthDp = 412, showBackground = true) +@Composable +private fun TableBehaviorPreview() { + BehaviorPreviewSurface { + BehaviorPreviewColumn { + BehaviorSection( + title = "Markdown table renders in RTL layout", + markdown = tableMarkdown, + ) + } + } +} + @Composable private fun BehaviorPreviewSurface( content: @Composable () -> Unit, @@ -215,3 +228,14 @@ private val hebrewDocumentWithOrderedListMarkdown = """ למידע מפורט יותר על האימוג׳ים החדשים והמשמעויות שלהם אפשר לעיין ב-Emojipedia או במקורות נוספים. """.trimIndent() + +private val tableMarkdown = """ + פסקה בעברית לפני הטבלה. + + | כותרת | Status | + | --- | --- | + | שלום | Ready | + | עברית ואז English | Works | + + English paragraph after the table. +""".trimIndent()