Another test, remove print statements

This commit is contained in:
Shadowfacts 2024-05-22 18:59:24 -04:00
parent 5fbf806e73
commit a93a53e8d3
2 changed files with 10 additions and 8 deletions

View File

@ -19,11 +19,7 @@ import Foundation
*/
struct BlockStateMachine {
var blockState: BlockState = .start {
didSet {
print("new state: \(blockState)")
}
}
var blockState: BlockState = .start
let blockBreak: String
let lineBreak: String
let listIndentForContentOutsideItem: String
@ -34,7 +30,6 @@ struct BlockStateMachine {
extension BlockStateMachine {
mutating func startOrEndBlock() {
print("start/end block")
switch blockState {
case .start:
break
@ -83,7 +78,6 @@ extension BlockStateMachine {
}
mutating func continueBlock(char: UnicodeScalar) -> Bool {
print("continue block: \(char.debugDescription)")
let isNewline = char == "\n"
let isWhitespace = isNewline || isWhitespace(char)
switch blockState {
@ -298,7 +292,6 @@ extension BlockStateMachine {
}
mutating func breakTag() {
print("break tag")
switch blockState {
case .start:
break

View File

@ -561,6 +561,15 @@ final class AttributedStringConverterTests: XCTestCase {
XCTAssertEqual(convert("<ol><li><p>a</p></li><li><p>b</p></li></ol>"), result)
}
func testMultipleParagraphsInsideListItem() {
let result = NSAttributedString(string: "\t1.\ta\n\nb", attributes: [
.font: font,
.paragraphStyle: listParagraphStyle,
.foregroundColor: color,
])
XCTAssertEqual(convert("<ol><li><p>a</p><p>b</p></li></ol>"), result)
}
func testBreakBetweenListItems() {
let result = NSAttributedString(string: "\t1.\ta\n\n\t2.\tb", attributes: [
.font: font,