Add blockquote supports

This commit is contained in:
Thomas Ricouard 2024-10-05 13:03:29 +02:00
parent 1dec2ab68a
commit 7719046d10

View file

@ -189,6 +189,13 @@ public struct HTMLString: Codable, Equatable, Hashable, @unchecked Sendable {
}
// Strip newlines and line separators - they should be being sent as <br>s
asMarkdown += txt.replacingOccurrences(of: "\n", with: "").replacingOccurrences(of: "\u{2028}", with: "")
} else if node.nodeName() == "blockquote" {
asMarkdown += "\n\n`"
for nn in node.getChildNodes() {
handleNode(node: nn, indent: indent)
}
asMarkdown += "`"
return
} else if node.nodeName() == "strong" || node.nodeName() == "b" {
asMarkdown += "**"
for nn in node.getChildNodes() {