mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remove extra new line before list items and useless paragraph style
This commit is contained in:
committed by
Stefan Ceriu
parent
f33d29b7e9
commit
a1038f0ffe
@@ -738,6 +738,21 @@ class AttributedStringBuilderV1Tests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func testListTags() {
|
||||
let htmlString = "<p>like</p>\n<ul>\n<li>this<br />\ntest</li>\n</ul>\n"
|
||||
|
||||
guard let attributedString = attributedStringBuilder.fromHTML(htmlString) else {
|
||||
XCTFail("Could not build the attributed string")
|
||||
return
|
||||
}
|
||||
|
||||
if AttributedStringBuilder.useNextGenHTMLParser {
|
||||
XCTAssertEqual(String(attributedString.characters), "like\n\n • this\ntest")
|
||||
} else {
|
||||
XCTAssertEqual(String(attributedString.characters), "like\n\t•\tthis\u{2028}test")
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Phishing prevention
|
||||
|
||||
func testPhishingLink() {
|
||||
|
||||
Reference in New Issue
Block a user