diff --git a/ElementX/Sources/Other/HTMLParsing/HTMLFixtures.swift b/ElementX/Sources/Other/HTMLParsing/HTMLFixtures.swift index 277b6ee15..bd9a13c9d 100644 --- a/ElementX/Sources/Other/HTMLParsing/HTMLFixtures.swift +++ b/ElementX/Sources/Other/HTMLParsing/HTMLFixtures.swift @@ -68,9 +68,11 @@ enum HTMLFixtures: String, CaseIterable { """ case .separatedBlockQuotes: """ -
First blockquote with a link in it-
Second blockquote with a link in it-
Third blockquote with a link in it+ Text before blockquote +
Some blockquote+ Text after first blockquote +
Some other blockquote+ Text after second blockquote """ case .codeBlocks: """ diff --git a/UnitTests/Sources/AttributedStringBuilderTests.swift b/UnitTests/Sources/AttributedStringBuilderTests.swift index e09637772..0e3da2a0c 100644 --- a/UnitTests/Sources/AttributedStringBuilderTests.swift +++ b/UnitTests/Sources/AttributedStringBuilderTests.swift @@ -424,19 +424,19 @@ class AttributedStringBuilderV1Tests: XCTestCase { let coalescedComponents = attributedString.formattedComponents if AttributedStringBuilder.useNextGenHTMLParser { - XCTAssertEqual(attributedString.runs.count, 11) + XCTAssertEqual(attributedString.runs.count, 5) XCTAssertEqual(coalescedComponents.count, 5) } else { - XCTAssertEqual(attributedString.runs.count, 7) - XCTAssertEqual(coalescedComponents.count, 1) + XCTAssertEqual(attributedString.runs.count, 6) + XCTAssertEqual(coalescedComponents.count, 5) } var numberOfBlockquotes = 0 - for run in attributedString.runs where run.elementX.blockquote ?? false && run.link != nil { + for run in attributedString.runs where run.elementX.blockquote ?? false { numberOfBlockquotes += 1 } - XCTAssertEqual(numberOfBlockquotes, 3, "Couldn't find all the blockquotes") + XCTAssertEqual(numberOfBlockquotes, 2, "Couldn't find all the blockquotes") } func testUserPermalinkMentionAtachment() {