fix: wire markdown variant renderer

This commit is contained in:
Peter Steinberger
2026-01-16 09:19:20 +00:00
parent 4965727f39
commit 949fa1051f
3 changed files with 14 additions and 10 deletions

View File

@@ -43,12 +43,17 @@ private struct ChatMarkdownStyle: ViewModifier {
let textColor: Color
func body(content: Content) -> some View {
content
.font(self.font)
.foregroundStyle(self.textColor)
.textual.structuredTextStyle(self.variant == .compact ? .default : .gitHub)
.textual.inlineStyle(self.inlineStyle)
.textual.textSelection(.enabled)
Group {
if self.variant == .compact {
content.textual.structuredTextStyle(.default)
} else {
content.textual.structuredTextStyle(.gitHub)
}
}
.font(self.font)
.foregroundStyle(self.textColor)
.textual.inlineStyle(self.inlineStyle)
.textual.textSelection(.enabled)
}
private var inlineStyle: InlineStyle {