Improved Markdown handling again

Sometimes, it happens that the live Markdown rendering goes wrong. See also #28 and b185463c3e.
This commit is contained in:
tsommer committed 2024-05-25 22:24:09 +02:00
1 parent 1690bd13ec
commit 01e237da4f
1 file changed
+11 -1
@@ -1,3 +1,4 @@
@using AIStudio.Tools
@using MudBlazor
<MudCard Class="my-2 rounded-lg" Outlined="@true">
@@ -35,8 +36,17 @@
}
else
{
<MudMarkdown Value="@textContent.Text"/>
@if (this.Content.IsStreaming)
{
<MudText Typo="Typo.body1" Style="white-space: pre-wrap;">
@textContent.Text
</MudText>
}
else
{
<MudMarkdown Value="@textContent.Text" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
}
}
}