Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension AttributedString.Index {

/// Indicates whether the index is valid for use with the provided discontiguous attributed string.
/// - Parameter text: A discontiguous attributed string used to validate the index.
/// - 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.
/// - 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.
public func isValid(within text: DiscontiguousAttributedSubstring) -> Bool {
self._version == text._guts.version &&
text._indices.contains(self._value)
Expand Down Expand Up @@ -100,7 +100,7 @@ extension RangeSet<AttributedString.Index> {
}

/// Indicates whether the range set is valid for use with the provided discontiguous attributed string.
/// - Parameter text: A discontigious attributed string used to validate the range set.
/// - Parameter text: A discontiguous attributed string used to validate the range set.
/// - 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.
public func isValid(within text: DiscontiguousAttributedSubstring) -> Bool {
self.ranges.allSatisfy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extension AttributedString {
extension AttributedString._InternalRuns {
/// A metric that assigns each run a size of 1; i.e., the metric corresponding to run offsets.
///
/// Runs are not divisable under this metric.
/// Runs are not divisible under this metric.
struct RunMetric: RopeMetric {
typealias Element = AttributedString._InternalRun
typealias Summary = Element.Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ extension AttributeScopes.FoundationAttributes {
guard text.count == 1 else {
throw DecodingError.dataCorrupted(DecodingError.Context(
codingPath: container.codingPath,
debugDescription: "List item delimeter encoded value must contain only one character / grapheme cluster"
debugDescription: "List item delimiter encoded value must contain only one character / grapheme cluster"
))
}
return text[text.startIndex]
Expand Down Expand Up @@ -902,7 +902,7 @@ extension AttributedString {
/// The writing direction of a piece of text.
///
/// Writing direction defines the base direction in which bidirectional text
/// lays out its directional runs. A directional run is a contigous sequence
/// lays out its directional runs. A directional run is a contiguous sequence
/// of characters that all have the same effective directionality, which can
/// be determined using the Unicode BiDi algorithm. The ``leftToRight``
/// writing direction puts the directional run that is placed first in the
Expand Down