Automatically add insert a new line after headers

This commit is contained in:
Stefan Ceriu
2025-09-10 09:37:26 +03:00
committed by Stefan Ceriu
parent f790077861
commit 92685fbb50
2 changed files with 6 additions and 5 deletions
@@ -122,6 +122,7 @@ struct AttributedStringBuilderV2: AttributedStringBuilderProtocol {
let level = max(3, Int(String(tag.dropFirst())) ?? 1)
let size: CGFloat = fontPointSize + CGFloat(6 - level) * 2
content = attributedString(from: childElement, preserveFormatting: preserveFormatting, listTag: listTag, listIndex: &childIndex, indentLevel: indentLevel)
content.append(NSAttributedString(string: "\n"))
content.setFontPreservingSymbolicTraits(UIFont.boldSystemFont(ofSize: size))
case "p", "div":