Skip to content

Commit 10a2fa4

Browse files
committed
Fix linting
1 parent 728f3ba commit 10a2fa4

21 files changed

+70
-70
lines changed

Sources/RichTextKit/Actions/RichTextAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public enum RichTextAction: Identifiable, Equatable, RichTextLabelValue {
7878

7979
/// Step the line spacing.
8080
case stepLineSpacing(points: CGFloat)
81-
81+
8282
/// Set the current paragraph style.
8383
case setParagraphStyle(_ style: NSMutableParagraphStyle)
8484

Sources/RichTextKit/Bridging/RichTextViewComponent+Paragraph.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public extension RichTextViewComponent {
2222
var richTextParagraphStyle: NSMutableParagraphStyle? {
2323
richTextAttribute(.paragraphStyle)
2424
}
25-
25+
2626
/// Get a certain value from the current paragraph style.
2727
func richTextParagraphStyleValue<ValueType>(
2828
_ keyPath: WritableKeyPath<NSMutableParagraphStyle, ValueType>
@@ -44,7 +44,7 @@ public extension RichTextViewComponent {
4444
textStorageWrapper?.addAttribute(.paragraphStyle, value: style, range: range)
4545
#endif
4646
}
47-
47+
4848
/// Set a certain value for the current paragraph style.
4949
func setRichTextParagraphStyleValue<ValueType>(
5050
_ keyPath: WritableKeyPath<NSMutableParagraphStyle, ValueType>,
@@ -54,7 +54,7 @@ public extension RichTextViewComponent {
5454
style[keyPath: keyPath] = value
5555
setRichTextParagraphStyle(style)
5656
}
57-
57+
5858
/// Step a certain value for the current paragraph style.
5959
func stepRichTextParagraphStyleValue(
6060
_ keyPath: WritableKeyPath<NSMutableParagraphStyle, Int>,
@@ -63,7 +63,7 @@ public extension RichTextViewComponent {
6363
let current = richTextParagraphStyleValue(keyPath) ?? 0
6464
setRichTextParagraphStyleValue(keyPath, current + change)
6565
}
66-
66+
6767
/// Step a certain value for the current paragraph style.
6868
func stepRichTextParagraphStyleValue(
6969
_ keyPath: WritableKeyPath<NSMutableParagraphStyle, CGFloat>,

Sources/RichTextKit/Format/RichTextFormat+Sidebar.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public extension RichTextFormat {
6868

6969
SidebarSection {
7070
alignmentPicker(for: context)
71-
71+
7272
HStack {
7373
lineSpacingPicker(for: context)
7474
}

Sources/RichTextKit/Format/RichTextFormatToolbarBase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension RichTextFormatToolbarBase {
2727
}
2828

2929
extension RichTextFormatToolbarBase {
30-
30+
3131
func alignmentPicker(
3232
for context: RichTextContext
3333
) -> some View {

Sources/RichTextKit/Images/Image+RichText.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public extension Image {
2525
static let richTextAlignmentJustified = symbol("text.justify")
2626
static let richTextAlignmentLeft = symbol("text.alignleft")
2727
static let richTextAlignmentRight = symbol("text.alignright")
28-
28+
2929
static let richTextColorBackground = symbol("highlighter")
3030
static let richTextColorForeground = symbol("character")
3131
static let richTextColorReset = symbol("circle.slash")
@@ -60,7 +60,7 @@ public extension Image {
6060

6161
static let richTextSuperscriptDecrease = symbol("textformat.subscript")
6262
static let richTextSuperscriptIncrease = symbol("textformat.superscript")
63-
63+
6464
static let richTextUnknownValueType = symbol("questionmark")
6565
}
6666

Sources/RichTextKit/Keyboard/RichTextKeyboardToolbar+Config.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public struct RichTextKeyboardToolbarConfig {
3232

3333
/// Whether or not to always show the toolbar.
3434
public var alwaysDisplayToolbar: Bool
35-
35+
3636
/// Whether to display the format sheet button.
3737
public var displayFormatSheetButton: Bool
3838

Sources/RichTextKit/Keyboard/RichTextKeyboardToolbar.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private extension RichTextKeyboardToolbar {
187187
.contentShape(Rectangle())
188188
}
189189
}
190-
190+
191191
RichTextStyle.ToggleStack(context: context)
192192
.keyboardShortcutsOnly(if: isCompact)
193193

Sources/RichTextKit/Paragraph/NSMutableParagraphStyle+PickerValues.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import SwiftUI
1010

1111
public extension KeyPath where Root == NSMutableParagraphStyle {
12-
12+
1313
/// Get default picker values for the key path.
1414
var defaultPickerValues: [Value]? {
1515
switch self {
@@ -37,63 +37,63 @@ public extension KeyPath where Root == NSMutableParagraphStyle {
3737
}
3838

3939
public extension NSLineBreakMode {
40-
40+
4141
/// Get the default picker values.
4242
static var defaultPickerValues: [Self] {
4343
.defaultPickerValues
4444
}
4545
}
4646

4747
public extension Collection where Element == NSLineBreakMode {
48-
48+
4949
/// Get the default picker values.
5050
static var defaultPickerValues: [Element] {
5151
[.byWordWrapping, .byCharWrapping, .byClipping, .byTruncatingHead, .byTruncatingTail, .byTruncatingMiddle]
5252
}
5353
}
5454

5555
public extension NSParagraphStyle.LineBreakStrategy {
56-
56+
5757
/// Get the default picker values.
5858
static var defaultPickerValues: [Self] {
5959
.defaultPickerValues
6060
}
6161
}
6262

6363
public extension Collection where Element == NSParagraphStyle.LineBreakStrategy {
64-
64+
6565
/// Get the default picker values.
6666
static var defaultPickerValues: [Element] {
6767
[.standard, .pushOut, .hangulWordPriority]
6868
}
6969
}
7070

7171
public extension NSTextAlignment {
72-
72+
7373
/// Get the default picker values.
7474
static var defaultPickerValues: [Self] {
7575
.defaultPickerValues
7676
}
7777
}
7878

7979
public extension Collection where Element == NSTextAlignment {
80-
80+
8181
/// Get the default picker values.
8282
static var defaultPickerValues: [Element] {
8383
[.left, .center, .right, .justified]
8484
}
8585
}
8686

8787
public extension NSWritingDirection {
88-
88+
8989
/// Get the default picker values.
9090
static var defaultPickerValues: [Self] {
9191
.defaultPickerValues
9292
}
9393
}
9494

9595
public extension Collection where Element == NSWritingDirection {
96-
96+
9797
/// Get the default picker values.
9898
static var defaultPickerValues: [Element] {
9999
[.leftToRight, .rightToLeft]

Sources/RichTextKit/Paragraph/NSMutableParagraphStyle+StepperInterval.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import SwiftUI
1010

1111
public extension KeyPath where Root == NSMutableParagraphStyle, Value: Hashable & Strideable {
12-
12+
1313
/// Get the default stepper interval for the key path.
1414
var defaultStepperInterval: Value? {
1515
switch self {

Sources/RichTextKit/Paragraph/NSMutableParagraphStyleValueLabel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import SwiftUI
1111
/// This internal view is used by the Picker when building a
1212
/// picker for a certain rich text paragraph value.
1313
public struct NSMutableParagraphStyleValueLabel<ValueType: Hashable, ValueLabel: View>: View {
14-
14+
1515
let values: [ValueType]
1616
let valueLabel: (ValueType) -> ValueLabel
17-
17+
1818
public var body: some View {
1919
ForEach(Array(values.enumerated()), id: \.offset) {
2020
valueLabel($0.element).tag($0.offset)

0 commit comments

Comments
 (0)