fix(#1263): preserve nested inline Markdown styles (#1268)

This commit is contained in:
m57 authored and GitHub committed 2026-09-25 23:05:27 +03:00
1 parent e80b00a6a7
commit 1ba1a62f31
3 files changed
+188 -56

No files matched your search

@@ -0,0 +1,33 @@
package com.m57.hermescontrol.ui.chat
import androidx.compose.material3.MaterialTheme
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
@MediumTest
class MarkdownHeadingRenderingTest {
@get:Rule
val composeTestRule = createComposeRule()
@Test
fun headingRendersCodeInsideBold() {
composeTestRule.setContent {
MaterialTheme {
MarkdownText(
text = "## **Set `foo` now**",
textColor = MaterialTheme.colorScheme.onSurface,
)
}
}
composeTestRule.onNodeWithText("Set foo now").assertIsDisplayed()
composeTestRule.onNodeWithText("**Set `foo` now**").assertDoesNotExist()
}
}