[backend/masto-client] Fix missing line break after blockquote when SupportsHtmlFormatting is false

This commit is contained in:
Laura Hausmann 2025-01-07 09:04:04 +01:00
parent dc2ea392ae
commit bacd9a9262
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -391,6 +391,7 @@ public class MfmConverter(
var el = CreateInlineFormattingElement(document, "blockquote");
AddHtmlMarkup(document, el, "> ");
AppendChildren(el, document, node, mentions, host, usedMedia);
AddHtmlMarkupTag(document, el, "br");
return el;
}
case MfmTextNode textNode:
@ -455,4 +456,11 @@ public class MfmConverter(
el.AppendChild(document.CreateTextNode(chars));
node.AppendChild(el);
}
private void AddHtmlMarkupTag(IDocument document, IElement node, string tag)
{
if (SupportsHtmlFormatting.Value) return;
var el = document.CreateElement(tag);
node.AppendChild(el);
}
}