Skip to content

Commit d400a09

Browse files
committed
Made ListItem init public
1 parent ed92d74 commit d400a09

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Diff for: Proton/Sources/Swift/Core/ListParser.swift

+11
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ public struct ListItem {
3333

3434
/// Attribute value of the list item.
3535
public let attributeValue: Any
36+
37+
/// Creates a `ListItem`
38+
/// - Parameters:
39+
/// - text: Attributed value for text in `ListItem`
40+
/// - level: Indentation level of `ListItem`.
41+
/// - attributeValue: Attribute value to be applied to entire text range of `ListItem`
42+
public init(text: NSAttributedString, level: Int, attributeValue: Any) {
43+
self.text = text
44+
self.level = level
45+
self.attributeValue = attributeValue
46+
}
3647
}
3748

3849
/// Provides helper function to convert between `NSAttributedString` and `[ListItem]`

Diff for: Proton/Tests/Core/ListParserTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import Foundation
2222
import XCTest
2323

24-
@testable import Proton
24+
import Proton
2525

2626
class ListParserTests: XCTestCase {
2727

0 commit comments

Comments
 (0)