mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-20 17:13:31 +00:00
Gestion du <br> dans le markdown
This commit is contained in:
parent
91f21e3c54
commit
a9a827e2e5
4 changed files with 64 additions and 75 deletions
|
|
@ -179,6 +179,11 @@ namespace AideDeJeu.Tools
|
|||
var containerInline = inline as Markdig.Syntax.Inlines.ContainerInline;
|
||||
add = containerInline.ToMarkdownString();
|
||||
}
|
||||
else if (inline is Markdig.Syntax.Inlines.HtmlInline)
|
||||
{
|
||||
var htmlInline = inline as Markdig.Syntax.Inlines.HtmlInline;
|
||||
add = htmlInline.Tag;
|
||||
}
|
||||
else
|
||||
{
|
||||
add = inline.ToString();
|
||||
|
|
|
|||
|
|
@ -607,6 +607,23 @@
|
|||
},
|
||||
};
|
||||
|
||||
case HtmlInline html:
|
||||
if (html.Tag == "<br>")
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new Span()
|
||||
{
|
||||
Text="\r\n",
|
||||
FontSize = size,
|
||||
FontFamily = family,
|
||||
ForegroundColor = foregroundColor,
|
||||
BackgroundColor = backgroundColor
|
||||
},
|
||||
};
|
||||
}
|
||||
return null;
|
||||
|
||||
default:
|
||||
Debug.WriteLine($"Can't render {inline.GetType()} inlines.");
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue