Skip to content

Commit 2970e7f

Browse files
author
Gerardo
committed
Fix Hound lint issues
1 parent 42485a7 commit 2970e7f

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Aztec/Classes/Formatters/Implementations/MarkFormatter.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class MarkFormatter: AttributeFormatter {
66
var placeholderAttributes: [NSAttributedString.Key: Any]?
77
var textColor: String?
88
var defaulTextColor: UIColor?
9-
9+
1010
func applicationRange(for range: NSRange, in text: NSAttributedString) -> NSRange {
1111
return range
1212
}
@@ -25,8 +25,8 @@ class MarkFormatter: AttributeFormatter {
2525
representationToUse = requestedRepresentation
2626
}
2727
resultingAttributes[.markHtmlRepresentation] = representationToUse
28-
29-
if (textColor != nil) {
28+
29+
if textColor != nil {
3030
resultingAttributes[.foregroundColor] = UIColor(hexString: textColor!)
3131
}
3232

@@ -35,8 +35,8 @@ class MarkFormatter: AttributeFormatter {
3535

3636
func remove(from attributes: [NSAttributedString.Key: Any]) -> [NSAttributedString.Key: Any] {
3737
var resultingAttributes = attributes
38-
39-
if (defaulTextColor != nil) {
38+
39+
if defaulTextColor != nil {
4040
resultingAttributes[.foregroundColor] = defaulTextColor
4141
}
4242

Aztec/Classes/TextKit/TextView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,14 +1163,14 @@ open class TextView: UITextView {
11631163

11641164
// If the format exists remove the current formatting
11651165
// this can happen when the color changed.
1166-
if (formatter.present(in: typingAttributes)) {
1166+
if formatter.present(in: typingAttributes) {
11671167
typingAttributes = formatter.remove(from: typingAttributes)
11681168
let applicationRange = formatter.applicationRange(for: selectedRange, in: storage)
11691169
formatter.removeAttributes(from: storage, at: applicationRange)
1170-
typingAttributes = formatter.remove(from:typingAttributes)
1171-
1170+
typingAttributes = formatter.remove(from: typingAttributes)
1171+
11721172
// Reflect color changes by enabling the formatting again.
1173-
if (!resetColor) {
1173+
if !resetColor {
11741174
toggle(formatter: formatter, atRange: range)
11751175
}
11761176
return

0 commit comments

Comments
 (0)