Skip to content

Commit

Permalink
Made ListItem init public
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeep committed Apr 16, 2023
1 parent ed92d74 commit d400a09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Proton/Sources/Swift/Core/ListParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ public struct ListItem {

/// Attribute value of the list item.
public let attributeValue: Any

/// Creates a `ListItem`
/// - Parameters:
/// - text: Attributed value for text in `ListItem`
/// - level: Indentation level of `ListItem`.
/// - attributeValue: Attribute value to be applied to entire text range of `ListItem`
public init(text: NSAttributedString, level: Int, attributeValue: Any) {
self.text = text
self.level = level
self.attributeValue = attributeValue
}
}

/// Provides helper function to convert between `NSAttributedString` and `[ListItem]`
Expand Down
2 changes: 1 addition & 1 deletion Proton/Tests/Core/ListParserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import Foundation
import XCTest

@testable import Proton
import Proton

class ListParserTests: XCTestCase {

Expand Down

0 comments on commit d400a09

Please sign in to comment.