File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -516,4 +516,26 @@ class TextStorageTests: XCTestCase {
516516
517517 XCTAssertEqual ( expectedResult, result)
518518 }
519+
520+ func testCiteOutput( ) {
521+ let initialHTML = " <cite>Hello<br></cite> "
522+
523+ // Setup
524+ let defaultAttributes : [ NSAttributedString . Key : Any ] = [ . font: UIFont . systemFont ( ofSize: 14 ) ,
525+ . paragraphStyle: ParagraphStyle . default]
526+
527+ storage. setHTML ( initialHTML, defaultAttributes: defaultAttributes)
528+ var expectedResult = String ( " Hello " ) + String( . lineSeparator)
529+ var result = String ( storage. string)
530+
531+ XCTAssertEqual ( expectedResult, result)
532+
533+ storage. htmlConverter. characterToReplaceLastEmptyLine = Character ( . zeroWidthSpace)
534+
535+ storage. setHTML ( initialHTML, defaultAttributes: defaultAttributes)
536+ expectedResult = String ( " Hello " ) + String( . lineSeparator)
537+ result = String ( storage. string)
538+
539+ XCTAssertEqual ( expectedResult, result)
540+ }
519541}
You can’t perform that action at this time.
0 commit comments