Skip to content

Commit

Permalink
Added debug option for ListMarker display (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeep authored Mar 1, 2024
1 parent 36c6475 commit 4a64c4c
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
import Foundation
import UIKit

public enum ListMarkerDebugOption {
case `default`
case replace(with: String)
}

/// Text process capable of processing keyboard inputs specific to lists. `ListTextProcessor` only works after a range of text
/// has been converted to list using `ListCommand`.
///
Expand All @@ -34,9 +39,19 @@ import UIKit
open class ListTextProcessor: TextProcessing {
public let name = "listProcessor"


public static var markerDebugOptions: ListMarkerDebugOption = .default

// Zero width space - used for laying out the list bullet/number in an empty line.
// This is required when using tab on a blank bullet line. Without this, layout calculations are not performed.
static let blankLineFiller = "\u{200B}"
static var blankLineFiller: String {
switch markerDebugOptions {
case .default:
return "\u{200B}"
case .replace(let string):
return string
}
}

/// Initializes text processor.
public init() { }
Expand Down

0 comments on commit 4a64c4c

Please sign in to comment.