Skip to content

Commit

Permalink
Remove extra spaces in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Dec 7, 2024
1 parent 23f4698 commit 9584137
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ final class EditorTextView: NSTextView, CurrentLineHighlighting, MultiCursorEdit

/// Updates the app-wide automatic period substation behavior based on the receiver's `mode`.
///
/// Workaround for that the view-specific API to customize this behavior is currently not available (macOS 15, 2024-11, FB13669125).
/// Workaround for that the view-specific API to customize this behavior is currently not available (macOS 15, 2024-11, FB13669125).
private func invalidateAutomaticPeriodSubstitution() {

if self.window?.firstResponder == self {
Expand Down
2 changes: 1 addition & 1 deletion CotEditor/Sources/Document/FileNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ final class FileNode {

/// Whether the receiver's `kind` is `.folder`.
///
/// Unlike `.isDirectory` property, this property also returns `true` when the receiver is an alias linking to a folder.
/// Unlike `.isDirectory` property, this property also returns `true` when the receiver is an alias linking to a folder.
var isFolder: Bool {

self.kind == .folder
Expand Down
2 changes: 1 addition & 1 deletion CotEditor/Sources/Views/SwiftUI/TokenTextEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private extension NSAttributedString {
/// - Parameters:
/// - attrName: The name of an attribute.
/// - index: The index at which to test for `attributeName`.
/// - Returns: The character range of the attribute, or `nil`if the attribute was not specified.
/// - Returns: The character range of the attribute, or `nil`if the attribute was not specified.
func longestEffectiveRange(of attrName: NSAttributedString.Key, at index: Int) -> NSRange? {

var range = NSRange.notFound
Expand Down
2 changes: 1 addition & 1 deletion Packages/EditorCore/Sources/LineSort/SortOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public struct SortOptions: Equatable, Sendable {
/// If the receiver's `.numeric` property is `false`, it certainly returns `nil`.
///
/// - Parameter value: The string to parse.
/// - Returns: The numeric value or `nil` if failed.
/// - Returns: The numeric value or `nil` if failed.
func parse(_ value: String) -> Double? {

guard self.numeric else { return nil }
Expand Down
4 changes: 2 additions & 2 deletions Packages/EditorCore/Tests/TextFindTests/TextFindTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ struct TextFindTests {
textFind = try TextFind(for: "abcdefg ABCDEFG", findString: "(?!=a)b(c)(?=d)",
mode: .regularExpression(options: .caseInsensitive, unescapesReplacement: false))

(replacementItems, selectedRanges) = textFind.replaceAll(with: "$1\\\\t") { (_, _, _) in }
(replacementItems, selectedRanges) = textFind.replaceAll(with: "$1\\\\t") { (_, _, _) in }
#expect(replacementItems.count == 1)
#expect(replacementItems[0].value == "ac\\tdefg AC\\tDEFG")
#expect(replacementItems[0].range == NSRange(location: 0, length: 15))
Expand All @@ -243,7 +243,7 @@ struct TextFindTests {
selectedRanges: [NSRange(location: 1, length: 14),
NSRange(location: 16, length: 7)])

(replacementItems, selectedRanges) = textFind.replaceAll(with: "_") { (_, _, _) in }
(replacementItems, selectedRanges) = textFind.replaceAll(with: "_") { (_, _, _) in }
#expect(replacementItems.count == 2)
#expect(replacementItems[0].value == "bcdefg _defg")
#expect(replacementItems[0].range == NSRange(location: 1, length: 14))
Expand Down
2 changes: 1 addition & 1 deletion Tests/Sources/Models/LineEndingScannerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct LineEndingScannerTests {
let storage = NSTextStorage(string: "dog\ncat\r\ncow")
let scanner = LineEndingScanner(textStorage: storage, lineEnding: .lf)

// add \r before \n (LF -> CRLF)
// add \r before \n (LF -> CRLF)
storage.replaceCharacters(in: NSRange(3..<3), with: "\r")
// remove \n after \r (CRLF -> CR)
storage.replaceCharacters(in: NSRange(9..<10), with: "")
Expand Down

0 comments on commit 9584137

Please sign in to comment.