Add support for the <strike> tag in the attributed string builder

This commit is contained in:
Stefan Ceriu
2026-08-21 15:02:16 +03:00
parent 70714dd7f7
commit c65147678a
2 changed files with 12 additions and 1 deletions
@@ -185,7 +185,7 @@ nonisolated struct AttributedStringBuilder: AttributedStringBuilderProtocol {
content = attributedString(element: childElement, documentBody: documentBody, preserveFormatting: preserveFormatting, listTag: listTag, listIndex: &childIndex, indentLevel: indentLevel)
content.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: NSRange(location: 0, length: content.length))
case "s", "del":
case "s", "del", "strike":
content = attributedString(element: childElement, documentBody: documentBody, preserveFormatting: preserveFormatting, listTag: listTag, listIndex: &childIndex, indentLevel: indentLevel)
content.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: NSRange(location: 0, length: content.length))