Skip to content

Commit 48e77b6

Browse files
authored
feat(ios): render inline LaTeX math in completed chat prose (#101388)
1 parent e72dadb commit 48e77b6

7 files changed

Lines changed: 811 additions & 76 deletions

File tree

apps/ios/Tests/SwiftUIRenderSmokeTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ struct SwiftUIRenderSmokeTests {
115115
@Test @MainActor func `display math builds valid and fallback view hierarchies`() {
116116
for typeSize in [DynamicTypeSize.large, .accessibility2] {
117117
let root = VStack {
118+
ChatMarkdownRenderer(
119+
text: #"Inline math \(E = mc^2\) stays inside prose."#,
120+
context: .assistant,
121+
variant: .standard,
122+
font: OpenClawChatTypography.body,
123+
textColor: OpenClawChatTheme.assistantText)
118124
ChatMathBlockView(block: ChatMathBlock(
119125
latex: #"\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}"#,
120126
isComplete: true), textColor: OpenClawChatTheme.assistantText)

0 commit comments

Comments
 (0)