Improved Markdown handling again

Sometimes, it happens that the live Markdown rendering goes wrong. See also #28 and b185463c3e.
This commit is contained in:
Thorsten Sommer 2024-05-25 22:24:09 +02:00
parent 1690bd13ec
commit 01e237da4f
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -1,3 +1,4 @@
@using AIStudio.Tools
@using MudBlazor
<MudCard Class="my-2 rounded-lg" Outlined="@true">
@ -35,10 +36,19 @@
}
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"/>
}
}
}
break;