[backend/masto-client] Fix missing line break after blockquote when SupportsHtmlFormatting is false
This commit is contained in:
parent
dc2ea392ae
commit
bacd9a9262
1 changed files with 8 additions and 0 deletions
|
@ -391,6 +391,7 @@ public class MfmConverter(
|
||||||
var el = CreateInlineFormattingElement(document, "blockquote");
|
var el = CreateInlineFormattingElement(document, "blockquote");
|
||||||
AddHtmlMarkup(document, el, "> ");
|
AddHtmlMarkup(document, el, "> ");
|
||||||
AppendChildren(el, document, node, mentions, host, usedMedia);
|
AppendChildren(el, document, node, mentions, host, usedMedia);
|
||||||
|
AddHtmlMarkupTag(document, el, "br");
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
case MfmTextNode textNode:
|
case MfmTextNode textNode:
|
||||||
|
@ -455,4 +456,11 @@ public class MfmConverter(
|
||||||
el.AppendChild(document.CreateTextNode(chars));
|
el.AppendChild(document.CreateTextNode(chars));
|
||||||
node.AppendChild(el);
|
node.AppendChild(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddHtmlMarkupTag(IDocument document, IElement node, string tag)
|
||||||
|
{
|
||||||
|
if (SupportsHtmlFormatting.Value) return;
|
||||||
|
var el = document.CreateElement(tag);
|
||||||
|
node.AppendChild(el);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue