Skip to content

Commit 78844ba

Browse files
committed
Input em-dashes with space on both sides.
This matches the rest of the em-dashes in the book. In most cases, because an em-dash is a clause boundary, it ends up at the end of the line with semantic line breaks. The previous RST-based publication pipeline included a step to close up em-dashes, so these few exceptions didn't cause issues. DocC doesn't close up em-dashes, and the current instruction from editorial is to set em-dashes open because the San Francisco font otherwise sets things too close together. When setting this content in another font that doesn't have that issue, like Helvetica, we'd need to teach DocC to close up the em-dashes throughout.
1 parent 46dbe1e commit 78844ba

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ or determining whether two sets contain all, some, or none of the same values.
898898

899899
### Fundamental Set Operations
900900

901-
The illustration below depicts two sets---`a` and `b`---
901+
The illustration below depicts two sets --- `a` and `b` ---
902902
with the results of various set operations represented by the shaded regions.
903903

904904
![](setVennDiagram)
@@ -957,7 +957,7 @@ oddDigits.symmetricDifference(singleDigitPrimeNumbers).sorted()
957957

958958
### Set Membership and Equality
959959

960-
The illustration below depicts three sets---`a`, `b` and `c`---
960+
The illustration below depicts three sets --- `a`, `b` and `c` ---
961961
with overlapping regions representing elements shared among sets.
962962
Set `a` is a *superset* of set `b`,
963963
because `a` contains all elements in `b`.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ dial.dynamicallyCall(withArguments: [4, 1, 1])
327327
The declaration of the `dynamicallyCall(withArguments:)` method
328328
must have a single parameter that conforms to the
329329
[ExpressibleByArrayLiteral](https://developer.apple.com/documentation/swift/expressiblebyarrayliteral)
330-
protocol---like `[Int]` in the example above.
330+
protocol --- like `[Int]` in the example above.
331331
The return type can be any type.
332332

333333
You can include labels in a dynamic method call
@@ -389,7 +389,7 @@ must be
389389
[ExpressibleByStringLiteral](https://developer.apple.com/documentation/swift/expressiblebystringliteral).
390390
The previous example uses [KeyValuePairs](https://developer.apple.com/documentation/swift/keyvaluepairs)
391391
as the parameter type
392-
so that callers can include duplicate parameter labels---
392+
so that callers can include duplicate parameter labels ---
393393
`a` and `b` appear multiple times in the call to `repeat`.
394394

395395
If you implement both `dynamicallyCall` methods,
@@ -945,7 +945,7 @@ as discussed in <doc:Declarations#Top-Level-Code>.
945945

946946
Apply this attribute to a stored variable property of a class.
947947
This attribute causes the property's setter to be synthesized with a *copy*
948-
of the property's value---returned by the `copyWithZone(_:)` method---instead of the
948+
of the property's value --- returned by the `copyWithZone(_:)` method --- instead of the
949949
value of the property itself.
950950
The type of the property must conform to the `NSCopying` protocol.
951951

@@ -969,7 +969,7 @@ Applying this attribute also implies the `objc` attribute.
969969

970970
### objc
971971

972-
Apply this attribute to any declaration that can be represented in Objective-C---
972+
Apply this attribute to any declaration that can be represented in Objective-C ---
973973
for example, nonnested classes, protocols,
974974
nongeneric enumerations (constrained to integer raw-value types),
975975
properties and methods (including getters and setters) of classes,

Sources/TSPL/TSPL.docc/ReferenceManual/Declarations.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,8 @@ A function definition can appear inside another function declaration.
799799
This kind of function is known as a *nested function*.
800800

801801
A nested function is nonescaping if it captures
802-
a value that's guaranteed to never escape---
803-
such as an in-out parameter---
802+
a value that's guaranteed to never escape ---
803+
such as an in-out parameter ---
804804
or passed as a nonescaping function argument.
805805
Otherwise, the nested function is an escaping function.
806806

@@ -1529,7 +1529,7 @@ An *enumeration declaration* introduces a named enumeration type into your progr
15291529

15301530
Enumeration declarations have two basic forms and are declared using the `enum` keyword.
15311531
The body of an enumeration declared using either form contains
1532-
zero or more values---called *enumeration cases*---
1532+
zero or more values --- called *enumeration cases* ---
15331533
and any number of declarations,
15341534
including computed properties,
15351535
instance methods, type methods, initializers, type aliases,
@@ -2208,8 +2208,8 @@ and only to members of protocols that are marked
22082208
with the `objc` attribute. As a result, only class types can adopt and conform
22092209
to a protocol that contains optional member requirements.
22102210
For more information about how to use the `optional` declaration modifier
2211-
and for guidance about how to access optional protocol members---
2212-
for example, when you're not sure whether a conforming type implements them---
2211+
and for guidance about how to access optional protocol members ---
2212+
for example, when you're not sure whether a conforming type implements them ---
22132213
see <doc:Protocols#Optional-Protocol-Requirements>.
22142214

22152215
<!--
@@ -2825,8 +2825,8 @@ deinit {
28252825

28262826
A deinitializer is called automatically when there are no longer any references
28272827
to a class object, just before the class object is deallocated.
2828-
A deinitializer can be declared only in the body of a class declaration---
2829-
but not in an extension of a class---
2828+
A deinitializer can be declared only in the body of a class declaration ---
2829+
but not in an extension of a class ---
28302830
and each class can have at most one.
28312831

28322832
A subclass inherits its superclass's deinitializer,
@@ -3673,8 +3673,8 @@ to implement those members.You can apply the `optional` modifier only to protoco
36733673
with the `objc` attribute. As a result, only class types can adopt and conform
36743674
to a protocol that contains optional member requirements.
36753675
For more information about how to use the `optional` modifier
3676-
and for guidance about how to access optional protocol members---
3677-
for example, when you're not sure whether a conforming type implements them---
3676+
and for guidance about how to access optional protocol members ---
3677+
for example, when you're not sure whether a conforming type implements them ---
36783678
see <doc:Protocols#Optional-Protocol-Requirements>.
36793679

36803680
<!--

Sources/TSPL/TSPL.docc/ReferenceManual/Patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,12 @@ is <#type#>
392392
```
393393

394394
The `is` pattern matches a value if the type of that value at runtime is the same as
395-
the type specified in the right-hand side of the `is` pattern---or a subclass of that type.
395+
the type specified in the right-hand side of the `is` pattern --- or a subclass of that type.
396396
The `is` pattern behaves like the `is` operator in that they both perform a type cast
397397
but discard the returned type.
398398

399399
The `as` pattern matches a value if the type of that value at runtime is the same as
400-
the type specified in the right-hand side of the `as` pattern---or a subclass of that type.
400+
the type specified in the right-hand side of the `as` pattern --- or a subclass of that type.
401401
If the match succeeds,
402402
the type of the matched value is cast to the *pattern* specified in the right-hand side
403403
of the `as` pattern.

Sources/TSPL/TSPL.docc/ReferenceManual/Statements.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ for <#item#> in <#collection#> {
9292
```
9393

9494
The `makeIterator()` method is called on the *collection* expression
95-
to obtain a value of an iterator type---that is,
95+
to obtain a value of an iterator type --- that is,
9696
a type that conforms to the
9797
[IteratorProtocol](https://developer.apple.com/documentation/swift/iteratorprotocol) protocol.
9898
The program begins executing a loop
@@ -384,7 +384,7 @@ which must appear at the end of the `switch` statement.
384384
Although the actual execution order of pattern-matching operations,
385385
and in particular the evaluation order of patterns in cases, is unspecified,
386386
pattern matching in a `switch` statement behaves
387-
as if the evaluation is performed in source order---that is,
387+
as if the evaluation is performed in source order --- that is,
388388
the order in which they appear in source code.
389389
As a result, if multiple cases contain patterns that evaluate to the same value,
390390
and thus can match the value of the control expression,
@@ -430,7 +430,7 @@ you can include a default case to satisfy the requirement.
430430
#### Switching Over Future Enumeration Cases
431431

432432
A *nonfrozen enumeration* is a special kind of enumeration
433-
that may gain new enumeration cases in the future---
433+
that may gain new enumeration cases in the future ---
434434
even after you compile and ship an app.
435435
Switching over a nonfrozen enumeration requires extra consideration.
436436
When a library's authors mark an enumeration as nonfrozen,

Sources/TSPL/TSPL.docc/ReferenceManual/Types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ In addition to user-defined named types,
1111
the Swift standard library defines many commonly used named types,
1212
including those that represent arrays, dictionaries, and optional values.
1313

14-
Data types that are normally considered basic or primitive in other languages---
15-
such as types that represent numbers, characters, and strings---
14+
Data types that are normally considered basic or primitive in other languages ---
15+
such as types that represent numbers, characters, and strings ---
1616
are actually named types,
1717
defined and implemented in the Swift standard library using structures.
1818
Because they're named types,
@@ -1244,7 +1244,7 @@ That is,
12441244
the type of `x` in `var x: Int = 0` is inferred by first checking the type of `0`
12451245
and then passing this type information up to the root (the variable `x`).
12461246

1247-
In Swift, type information can also flow in the opposite direction---from the root down to the leaves.
1247+
In Swift, type information can also flow in the opposite direction --- from the root down to the leaves.
12481248
In the following example, for instance,
12491249
the explicit type annotation (`: Float`) on the constant `eFloat`
12501250
causes the numeric literal `2.71828` to have an inferred type of `Float` instead of `Double`.

0 commit comments

Comments
 (0)