Skip to content

Commit

Permalink
Fix defaultTextColor typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo committed Mar 18, 2024
1 parent 28e62ab commit 7b9cc63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Aztec/Classes/Formatters/Implementations/MarkFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class MarkFormatter: AttributeFormatter {

var placeholderAttributes: [NSAttributedString.Key: Any]?
var textColor: String?
var defaulTextColor: UIColor?
var defaultTextColor: UIColor?

func applicationRange(for range: NSRange, in text: NSAttributedString) -> NSRange {
return range
Expand Down Expand Up @@ -36,8 +36,8 @@ class MarkFormatter: AttributeFormatter {
func remove(from attributes: [NSAttributedString.Key: Any]) -> [NSAttributedString.Key: Any] {
var resultingAttributes = attributes

if defaulTextColor != nil {
resultingAttributes[.foregroundColor] = defaulTextColor
if defaultTextColor != nil {
resultingAttributes[.foregroundColor] = defaultTextColor
}

resultingAttributes.removeValue(forKey: .markHtmlRepresentation)
Expand Down
2 changes: 1 addition & 1 deletion Aztec/Classes/TextKit/TextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ open class TextView: UITextView {
open func toggleMark(range: NSRange, color: String?, resetColor: Bool) {
let formatter = MarkFormatter()
formatter.placeholderAttributes = self.defaultAttributes
formatter.defaulTextColor = self.defaultTextColor
formatter.defaultTextColor = self.defaultTextColor
formatter.textColor = color

// If the format exists remove the current formatting
Expand Down

0 comments on commit 7b9cc63

Please sign in to comment.