mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 23:12:10 +00:00
Fix single line breaks rendering as spaces in chat messages
This commit is contained in:
parent
fc53278c60
commit
46ad011e7b
@ -103,7 +103,7 @@
|
||||
var segmentContent = segment.GetContent(renderPlan.Source);
|
||||
if (segment.Type is MarkdownRenderSegmentType.MARKDOWN)
|
||||
{
|
||||
<MudMarkdown @key="@segment.RenderKey" Value="@segmentContent" Props="Markdown.DefaultConfig" Styling="@this.MarkdownStyling" MarkdownPipeline="Markdown.SAFE_MARKDOWN_PIPELINE" />
|
||||
<MudMarkdown @key="@segment.RenderKey" Value="@segmentContent" Props="Markdown.DefaultConfig" Styling="@this.MarkdownStyling" MarkdownPipeline="Markdown.CHAT_MARKDOWN_PIPELINE" />
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -10,6 +10,12 @@ public static class Markdown
|
||||
.DisableHtml()
|
||||
.Build();
|
||||
|
||||
public static readonly MarkdownPipeline CHAT_MARKDOWN_PIPELINE = new MarkdownPipelineBuilder()
|
||||
.UseAdvancedExtensions()
|
||||
.UseSoftlineBreakAsHardlineBreak()
|
||||
.DisableHtml()
|
||||
.Build();
|
||||
|
||||
public static MudMarkdownProps DefaultConfig => new()
|
||||
{
|
||||
Heading =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user