Skip to content

Commit 357befc

Browse files
authored
Fix: attributed string typos (#1588)
* fix: discontiguous attributed string * fix: not divisable * fix: item delimiter * fix: contiguous sequence
1 parent 709808e commit 357befc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sources/FoundationEssentials/AttributedString/AttributedString+IndexValidity.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extension AttributedString.Index {
5656

5757
/// Indicates whether the index is valid for use with the provided discontiguous attributed string.
5858
/// - Parameter text: A discontiguous attributed string used to validate the index.
59-
/// - Returns: `true` when the index is valid for use with the provided discontiguous attributed string; otherwise, false. An index is valid if it is both within the bounds of the discontigous attributed string and was produced from the provided string without any intermediate mutations.
59+
/// - Returns: `true` when the index is valid for use with the provided discontiguous attributed string; otherwise, false. An index is valid if it is both within the bounds of the discontiguous attributed string and was produced from the provided string without any intermediate mutations.
6060
public func isValid(within text: DiscontiguousAttributedSubstring) -> Bool {
6161
self._version == text._guts.version &&
6262
text._indices.contains(self._value)
@@ -100,7 +100,7 @@ extension RangeSet<AttributedString.Index> {
100100
}
101101

102102
/// Indicates whether the range set is valid for use with the provided discontiguous attributed string.
103-
/// - Parameter text: A discontigious attributed string used to validate the range set.
103+
/// - Parameter text: A discontiguous attributed string used to validate the range set.
104104
/// - Returns: `true` when the range set is valid for use with the provided discontiguous attributed string; otherwise, false. A range set is valid if each of its ranges are valid in the discontiguous attributed string.
105105
public func isValid(within text: DiscontiguousAttributedSubstring) -> Bool {
106106
self.ranges.allSatisfy {

Sources/FoundationEssentials/AttributedString/AttributedString+_InternalRuns.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extension AttributedString {
4444
extension AttributedString._InternalRuns {
4545
/// A metric that assigns each run a size of 1; i.e., the metric corresponding to run offsets.
4646
///
47-
/// Runs are not divisable under this metric.
47+
/// Runs are not divisible under this metric.
4848
struct RunMetric: RopeMetric {
4949
typealias Element = AttributedString._InternalRun
5050
typealias Summary = Element.Summary

Sources/FoundationEssentials/AttributedString/FoundationAttributes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ extension AttributeScopes.FoundationAttributes {
470470
guard text.count == 1 else {
471471
throw DecodingError.dataCorrupted(DecodingError.Context(
472472
codingPath: container.codingPath,
473-
debugDescription: "List item delimeter encoded value must contain only one character / grapheme cluster"
473+
debugDescription: "List item delimiter encoded value must contain only one character / grapheme cluster"
474474
))
475475
}
476476
return text[text.startIndex]
@@ -902,7 +902,7 @@ extension AttributedString {
902902
/// The writing direction of a piece of text.
903903
///
904904
/// Writing direction defines the base direction in which bidirectional text
905-
/// lays out its directional runs. A directional run is a contigous sequence
905+
/// lays out its directional runs. A directional run is a contiguous sequence
906906
/// of characters that all have the same effective directionality, which can
907907
/// be determined using the Unicode BiDi algorithm. The ``leftToRight``
908908
/// writing direction puts the directional run that is placed first in the

0 commit comments

Comments
 (0)