Skip to content

Commit 8153a3d

Browse files
committed
Adjust documentation and linting
1 parent cc4e5e4 commit 8153a3d

10 files changed

+16
-16
lines changed

Demo/iOS/EditorScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private extension EditorScreen {
5858
leadingButtons: {},
5959
trailingButtons: {}
6060
) {
61-
var sheet = $0
61+
let sheet = $0
6262
// Uncomment this to show all color pickers
6363
// sheet.colorPickers = .allCases
6464
return sheet

Sources/RichTextKit/Attributes/RichTextAttributeWriter+Alignment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public extension RichTextAttributeWriter {
2222
///
2323
/// > Todo: Something's currently off with alignment. It
2424
/// spils over to other paragraphs when moving the input
25-
/// cursor and inserting new text.
25+
/// cursor and inserting new text.
2626
func setRichTextAlignment(
2727
_ alignment: RichTextAlignment,
2828
at range: NSRange

Sources/RichTextKit/Colors/RichTextColor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ public extension RichTextColor {
8181
}
8282

8383
public extension Collection where Element == RichTextColor {
84-
84+
8585
static var allCases: [RichTextColor] { Element.allCases }
8686
}

Sources/RichTextKit/Data/RichTextDataError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
/**
1212
This enum represents rich text data-related errors.
1313
*/
14-
enum RichTextDataError: Error {
14+
public enum RichTextDataError: Error {
1515

1616
case invalidArchivedData(in: Data)
1717
case invalidPlainTextData(in: Data)

Sources/RichTextKit/Fonts/RichTextFont+Picker.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ public extension RichTextFont {
1212

1313
/**
1414
This font picker can be used to pick a font from a list.
15-
It uses ``RichTextFontPickerFont/all`` as default fonts.
15+
16+
This picker uses ``RichTextFont/PickerFont/all`` as the
17+
default fonts.
1618

1719
This view renders a plain `Picker`, which means you can
1820
use and configure it in all ways supported by SwiftUI.
1921

2022
Note that macOS will render every font correctly, while
21-
iOS will only do it in a wheel/inline picker. Try using
22-
``RichTextFontListPicker``/``RichTextFontForEachPicker``
23-
on iOS, if you need a proper list.
23+
iOS will only do it in a wheel/inline picker.
2424
*/
2525
struct Picker: View {
2626

2727
/**
2828
Create a font picker.
2929

3030
- Parameters:
31-
- selection: The selected font name.
32-
- fonts: The fonts to display in the list, by default `all`.
33-
- fontSize: The font size to use in the list items.
31+
- selection: The selected font name.
32+
- fonts: The fonts to display in the list, by default `all`.
33+
- fontSize: The font size to use in the list items.
3434
*/
3535
public init(
3636
selection: Binding<FontName>,

Sources/RichTextKit/Fonts/RichTextFont+PickerFont.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public extension RichTextFont {
3232
which must have its name adjusted.
3333

3434
To change the display name of a system font, simply set
35-
``RichTextFontPickerFont/standardSystemFontDisplayName``
35+
``RichTextFont/PickerFont/standardSystemFontDisplayName``
3636
to another value.
3737

3838
To change how fonts are detected by the system, use the

Sources/RichTextKit/Fonts/RichTextFont+SizePicker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public extension RichTextFont {
2323

2424
- Parameters:
2525
- selection: The selected font size.
26-
- sizes: The sizes to display in the list, by default ``RichTextFontSizePicker/standardFontSizes``.
26+
- sizes: The font sizes to display in the list.
2727
*/
2828
public init(
2929
selection: Binding<CGFloat>,

Sources/RichTextKit/Fonts/RichTextFont+SizePickerStack.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public extension RichTextFont {
2222

2323
- Parameters:
2424
- context: The context to affect.
25-
- values: The sizes to display in the list, by default ``RichTextFontSizePicker/standardFontSizes``.
25+
- values: The sizes to display in the list, by default ``RichTextFont/SizePicker/standardFontSizes``.
2626
*/
2727
public init(
2828
context: RichTextContext,

Sources/RichTextKit/Styles/RichTextStyle+Button.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct RichTextStyle_Button_Previews: PreviewProvider {
121121
var body: some View {
122122
HStack {
123123
Text(isBoldOn.description)
124-
124+
125125
RichTextStyle.Button(
126126
style: .bold,
127127
value: $isBoldOn)

Tests/RichTextKitTests/Colors/RichTextColorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import RichTextKit
1010
import XCTest
1111

1212
final class RichTextColorTests: XCTestCase {
13-
13+
1414
func testAllCasesExcludesUndefined() {
1515
let colors = RichTextColor.allCases
1616
let expected: [RichTextColor] = [

0 commit comments

Comments
 (0)