Skip to content

Commit

Permalink
Fix error in CodeBlockElement: cannot convert from 'string' to 'char'
Browse files Browse the repository at this point in the history
  • Loading branch information
ShankarBUS committed Dec 8, 2024
1 parent 284c63e commit 3200b4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symptum.UI/Markdown/TextElements/CodeBlockElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public CodeBlockElement(CodeBlock codeBlock, MarkdownConfiguration config)
}
}

formatter.FormatInlines(stringBuilder.ToString().TrimEnd("\r\n"), fencedCodeBlock.ToLanguage(), textBlock.Inlines);
formatter.FormatInlines(stringBuilder.ToString().TrimEnd(Environment.NewLine.AsSpan()), fencedCodeBlock.ToLanguage(), textBlock.Inlines);

Check failure on line 60 in src/Symptum.UI/Markdown/TextElements/CodeBlockElement.cs

View workflow job for this annotation

GitHub Actions / Deploy to GitHub Pages

Argument 1: cannot convert from 'System.ReadOnlySpan<char>' to 'char'
}
else
{
Expand All @@ -68,7 +68,7 @@ public CodeBlockElement(CodeBlock codeBlock, MarkdownConfiguration config)

if (i < codeBlock.Lines.Lines.Length - 1) stringBuilder.AppendLine();
}
textBlock.Text = stringBuilder.ToString().TrimEnd("\r\n");
textBlock.Text = stringBuilder.ToString().TrimEnd(Environment.NewLine.AsSpan());

Check failure on line 71 in src/Symptum.UI/Markdown/TextElements/CodeBlockElement.cs

View workflow job for this annotation

GitHub Actions / Deploy to GitHub Pages

Argument 1: cannot convert from 'System.ReadOnlySpan<char>' to 'char'
}
border.Child = new ScrollViewer() { Content = textBlock, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto };
_container.UIElement = border;
Expand Down

0 comments on commit 3200b4e

Please sign in to comment.