Skip to content

Commit caa5009

Browse files
authored
Restore paragraph breaks that were lost lost during the RST export (#79)
Fixes rdar://102991635
2 parents 0f07c46 + b84a790 commit caa5009

File tree

11 files changed

+64
-22
lines changed

11 files changed

+64
-22
lines changed

Sources/TSPL/TSPL.docc/LanguageGuide/AutomaticReferenceCounting.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,9 @@ and ARC never sets an unowned reference's value to `nil`.
601601
-->
602602

603603
> Important: Use an unowned reference only when you are sure that
604-
> the reference *always* refers to an instance that hasn't been deallocated.If you try to access the value of an unowned reference
604+
> the reference *always* refers to an instance that hasn't been deallocated.
605+
>
606+
> If you try to access the value of an unowned reference
605607
> after that instance has been deallocated,
606608
> you'll get a runtime error.
607609
@@ -768,7 +770,9 @@ after the `john` variable is set to `nil`.
768770
> you need to disable runtime safety checks ---
769771
> for example, for performance reasons.
770772
> As with all unsafe operations,
771-
> you take on the responsibility for checking that code for safety.You indicate an unsafe unowned reference by writing `unowned(unsafe)`.
773+
> you take on the responsibility for checking that code for safety.
774+
>
775+
> You indicate an unsafe unowned reference by writing `unowned(unsafe)`.
772776
> If you try to access an unsafe unowned reference
773777
> after the instance that it refers to is deallocated,
774778
> your program will try to access the memory location
@@ -909,7 +913,9 @@ that other courses might have.
909913
> Note: The underlying type of an optional value is `Optional`,
910914
> which is an enumeration in the Swift standard library.
911915
> However, optionals are an exception to the rule that
912-
> value types can't be marked with `unowned`.The optional that wraps the class
916+
> value types can't be marked with `unowned`.
917+
>
918+
> The optional that wraps the class
913919
> doesn't use reference counting,
914920
> so you don't need to maintain a strong reference to the optional.
915921

Sources/TSPL/TSPL.docc/LanguageGuide/Closures.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,9 @@ the next time the `incrementer` function is called.
731731
> Note: As an optimization,
732732
> Swift may instead capture and store a *copy* of a value
733733
> if that value isn't mutated by a closure,
734-
> and if the value isn't mutated after the closure is created.Swift also handles all memory management involved in disposing of
734+
> and if the value isn't mutated after the closure is created.
735+
>
736+
> Swift also handles all memory management involved in disposing of
735737
> variables when they're no longer needed.
736738
737739
Here's an example of `makeIncrementer` in action:

Sources/TSPL/TSPL.docc/LanguageGuide/CollectionTypes.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ and its size and contents can't be changed.
5454
An *array* stores values of the same type in an ordered list.
5555
The same value can appear in an array multiple times at different positions.
5656

57-
> Note: Swift's `Array` type is bridged to Foundation's `NSArray` class.For more information about using `Array` with Foundation and Cocoa,
57+
> Note: Swift's `Array` type is bridged to Foundation's `NSArray` class.
58+
>
59+
> For more information about using `Array` with Foundation and Cocoa,
5860
> see [Bridging Between Array and NSArray](https://developer.apple.com/documentation/swift/array#2846730).
5961
6062
### Array Type Shorthand Syntax
@@ -580,7 +582,9 @@ in a collection with no defined ordering.
580582
You can use a set instead of an array when the order of items isn't important,
581583
or when you need to ensure that an item only appears once.
582584

583-
> Note: Swift's `Set` type is bridged to Foundation's `NSSet` class.For more information about using `Set` with Foundation and Cocoa,
585+
> Note: Swift's `Set` type is bridged to Foundation's `NSSet` class.
586+
>
587+
> For more information about using `Set` with Foundation and Cocoa,
584588
> see [Bridging Between Set and NSSet](https://developer.apple.com/documentation/swift/set#2845530).
585589
586590
<!--
@@ -1027,7 +1031,9 @@ You use a dictionary when you need to look up values based on their identifier,
10271031
in much the same way that a real-world dictionary is used to look up
10281032
the definition for a particular word.
10291033

1030-
> Note: Swift's `Dictionary` type is bridged to Foundation's `NSDictionary` class.For more information about using `Dictionary` with Foundation and Cocoa,
1034+
> Note: Swift's `Dictionary` type is bridged to Foundation's `NSDictionary` class.
1035+
>
1036+
> For more information about using `Dictionary` with Foundation and Cocoa,
10311037
> see [Bridging Between Dictionary and NSDictionary](https://developer.apple.com/documentation/swift/dictionary#2846239).
10321038
10331039
### Dictionary Type Shorthand Syntax

Sources/TSPL/TSPL.docc/LanguageGuide/ControlFlow.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,9 +1732,11 @@ and to determine whether the move is allowed:
17321732

17331733
> Note: If the `break` statement above didn't use the `gameLoop` label,
17341734
> it would break out of the `switch` statement, not the `while` statement.
1735-
> Using the `gameLoop` label makes it clear which control statement should be terminated.It isn't strictly necessary to use the `gameLoop` label
1735+
> Using the `gameLoop` label makes it clear which control statement should be terminated.
1736+
>
1737+
> It isn't strictly necessary to use the `gameLoop` label
17361738
> when calling `continue gameLoop` to jump to the next iteration of the loop.
1737-
> there's only one loop in the game,
1739+
> There's only one loop in the game,
17381740
> and therefore no ambiguity as to which loop the `continue` statement will affect.
17391741
> However, there's no harm in using the `gameLoop` label with the `continue` statement.
17401742
> Doing so is consistent with the label's use alongside the `break` statement

Sources/TSPL/TSPL.docc/LanguageGuide/Inheritance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,9 @@ For more information on property observers, see <doc:Properties#Property-Observe
435435
> inherited constant stored properties or inherited read-only computed properties.
436436
> The value of these properties can't be set,
437437
> and so it isn't appropriate to provide a `willSet` or `didSet` implementation
438-
> as part of an override.Note also that you can't provide both
438+
> as part of an override.
439+
>
440+
> Note also that you can't provide both
439441
> an overriding setter and an overriding property observer for the same property.
440442
> If you want to observe changes to a property's value,
441443
> and you are already providing a custom setter for that property,

Sources/TSPL/TSPL.docc/LanguageGuide/MemorySafety.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ you have to determine what it was intended to do.
112112
> However,
113113
> the conflicting access discussed here can happen
114114
> on a single thread and
115-
> *doesn't* involve concurrent or multithreaded code.If you have conflicting access to memory
115+
> *doesn't* involve concurrent or multithreaded code.
116+
>
117+
> If you have conflicting access to memory
116118
> from within a single thread,
117119
> Swift guarantees that you'll get an error
118120
> at either compile time or runtime.

Sources/TSPL/TSPL.docc/LanguageGuide/Properties.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,9 @@ the new value that you assign replaces the one that was just set.
737737
> are called when a property is set in a subclass initializer,
738738
> after the superclass initializer has been called.
739739
> They aren't called while a class is setting its own properties,
740-
> before the superclass initializer has been called.For more information about initializer delegation,
740+
> before the superclass initializer has been called.
741+
>
742+
> For more information about initializer delegation,
741743
> see <doc:Initialization#Initializer-Delegation-for-Value-Types>
742744
> and <doc:Initialization#Initializer-Delegation-for-Class-Types>.
743745
@@ -1676,7 +1678,9 @@ and they're written in the same way as computed properties.
16761678
> Note: Global constants and variables are always computed lazily,
16771679
> in a similar manner to <doc:Properties#Lazy-Stored-Properties>.
16781680
> Unlike lazy stored properties,
1679-
> global constants and variables don't need to be marked with the `lazy` modifier.Local constants and variables are never computed lazily.
1681+
> global constants and variables don't need to be marked with the `lazy` modifier.
1682+
>
1683+
> Local constants and variables are never computed lazily.
16801684
16811685
You can apply a property wrapper to a local stored variable,
16821686
but not to a global variable or a computed variable.
@@ -1763,7 +1767,9 @@ in the same way as computed instance properties.
17631767
> Note: Unlike stored instance properties,
17641768
> you must always give stored type properties a default value.
17651769
> This is because the type itself doesn't have an initializer
1766-
> that can assign a value to a stored type property at initialization time.Stored type properties are lazily initialized on their first access.
1770+
> that can assign a value to a stored type property at initialization time.
1771+
>
1772+
> Stored type properties are lazily initialized on their first access.
17671773
> They're guaranteed to be initialized only once,
17681774
> even when accessed by multiple threads simultaneously,
17691775
> and they don't need to be marked with the `lazy` modifier.

Sources/TSPL/TSPL.docc/LanguageGuide/StringsAndCharacters.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ and provides support for accessing those characters in various Unicode represent
2929
> Note: Swift's `String` type is bridged with Foundation's `NSString` class.
3030
> Foundation also extends `String` to expose methods defined by `NSString`.
3131
> This means, if you import Foundation,
32-
> you can access those `NSString` methods on `String` without casting.For more information about using `String` with Foundation and Cocoa,
32+
> you can access those `NSString` methods on `String` without casting.
33+
>
34+
> For more information about using `String` with Foundation and Cocoa,
3335
> see [Bridging Between String and NSString](https://developer.apple.com/documentation/swift/string#2919514).
3436
3537
## String Literals
@@ -958,7 +960,9 @@ print("the number of characters in \(word) is \(word.count)")
958960
> If you are working with particularly long string values,
959961
> be aware that the `count` property
960962
> must iterate over the Unicode scalars in the entire string
961-
> in order to determine the characters for that string.The count of the characters returned by the `count` property
963+
> in order to determine the characters for that string.
964+
>
965+
> The count of the characters returned by the `count` property
962966
> isn't always the same as the `length` property of
963967
> an `NSString` that contains the same characters.
964968
> The length of an `NSString` is based on

Sources/TSPL/TSPL.docc/LanguageGuide/TheBasics.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,7 +2005,9 @@ by one of the switch's other cases.
20052005
> The compiler assumes that preconditions are always true,
20062006
> and it optimizes your code accordingly.
20072007
> However, the `fatalError(_:file:line:)` function always halts execution,
2008-
> regardless of optimization settings.You can use the `fatalError(_:file:line:)` function
2008+
> regardless of optimization settings.
2009+
>
2010+
> You can use the `fatalError(_:file:line:)` function
20092011
> during prototyping and early development
20102012
> to create stubs for functionality that hasn't been implemented yet,
20112013
> by writing `fatalError("Unimplemented")` as the stub implementation.

Sources/TSPL/TSPL.docc/ReferenceManual/Attributes.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ including important milestones.
120120
```swift
121121
renamed: <#new name#>
122122
```
123-
The *new name* consists of a string literal.You can apply the `available` attribute
123+
The *new name* consists of a string literal.
124+
125+
You can apply the `available` attribute
124126
with the `renamed` and `unavailable` arguments
125127
to a type alias declaration, as shown below,
126128
to indicate that the name of a declaration changed
@@ -1578,7 +1580,9 @@ into code that calls the static methods of the result builder type:
15781580
because it's one of the types in the `DrawEither` generic type.
15791581
This could cause your program to crash if `FutureText`
15801582
isn't available at runtime,
1581-
even in the case where that type is explicitly not being used.To solve this problem,
1583+
even in the case where that type is explicitly not being used.
1584+
1585+
To solve this problem,
15821586
implement a `buildLimitedAvailability(_:)` method
15831587
to erase type information.
15841588
For example, the code below builds an `AnyDrawable` value
@@ -1613,7 +1617,9 @@ into code that calls the static methods of the result builder type:
16131617
the leaf nodes of a binary tree,
16141618
and the statement becomes
16151619
a nested call to the `buildEither` methods
1616-
following the path to that leaf node from the root node.For example, if you write a switch statement that has three cases,
1620+
following the path to that leaf node from the root node.
1621+
1622+
For example, if you write a switch statement that has three cases,
16171623
the compiler uses a binary tree with three leaf nodes.
16181624
Likewise,
16191625
because the path from the root node to the second case is

0 commit comments

Comments
 (0)