Skip to content

Commit 9adac21

Browse files
amartini51Marc LiyanageApolloZhu
authored
Fix some broken links (#332)
Fix some incorrect and outdated URLs. Switch to HTTPS in a few places. Improve detection of broken links in the preflight script. Co-authored-by: Marc Liyanage <[email protected]> Co-authored-by: Apollo Zhu <[email protected]>
2 parents 0e2e118 + 04b5fdc commit 9adac21

File tree

9 files changed

+20
-17
lines changed

9 files changed

+20
-17
lines changed

TSPL.docc/LanguageGuide/Concurrency.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,10 @@ You have complete flexibility to manage unstructured tasks
917917
in whatever way your program needs,
918918
but you're also completely responsible for their correctness.
919919
To create an unstructured task that runs on the current actor,
920-
call the [`Task.init(priority:operation:)`](https://developer.apple.com/documentation/swift/task/3856790-init) initializer.
920+
call the [`Task.init(priority:operation:)`][] initializer.
921921
To create an unstructured task that's not part of the current actor,
922922
known more specifically as a *detached task*,
923-
call the [`Task.detached(priority:operation:)`](https://developer.apple.com/documentation/swift/task/3856786-detached) class method.
923+
call the [`Task.detached(priority:operation:)`][] class method.
924924
Both of these operations return a task that you can interact with ---
925925
for example, to wait for its result or to cancel it.
926926

@@ -935,6 +935,9 @@ let result = await handle.value
935935
For more information about managing detached tasks,
936936
see [`Task`](https://developer.apple.com/documentation/swift/task).
937937

938+
[`Task.init(priority:operation:)`]: https://developer.apple.com/documentation/swift/task/init(priority:operation:)-7f0zv
939+
[`Task.detached(priority:operation:)`]: https://developer.apple.com/documentation/swift/task/detached(priority:operation:)-d24l
940+
938941
<!--
939942
TODO Add some conceptual guidance about
940943
when to make a method do its work in a detached task

TSPL.docc/LanguageGuide/Macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,11 @@ automatically includes a dependency on SwiftSyntax.
520520
If you're adding macros to an existing project,
521521
add a dependency on SwiftSyntax in your `Package.swift` file:
522522

523-
[SwiftSyntax]: http://github.com/apple/swift-syntax/
523+
[SwiftSyntax]: https://github.com/swiftlang/swift-syntax
524524

525525
```swift
526526
dependencies: [
527-
.package(url: "https://github.com/apple/swift-syntax", from: "509.0.0")
527+
.package(url: "https://github.com/swiftlang/swift-syntax", from: "509.0.0")
528528
],
529529
```
530530

@@ -633,7 +633,7 @@ so you can use this approach when implementing any kind of macro.
633633
<!--
634634
The return-a-string APIs come from here
635635
636-
https://github.com/apple/swift-syntax/blob/main/Sources/SwiftSyntaxBuilder/Syntax%2BStringInterpolation.swift
636+
https://github.com/swiftlang/swift-syntax/blob/main/Sources/SwiftSyntaxBuilder/Syntax%2BStringInterpolation.swift
637637
-->
638638

639639

TSPL.docc/ReferenceManual/Attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ Or are those supported today?
752752
I see #error and #warning as @freestanding(declaration)
753753
in the stdlib already:
754754
755-
https://github.com/apple/swift/blob/main/stdlib/public/core/Macros.swift#L102
755+
https://github.com/swiftlang/swift/blob/main/stdlib/public/core/Macros.swift#L102
756756
-->
757757

758758
### frozen

TSPL.docc/ReferenceManual/Declarations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3582,7 +3582,7 @@ Call the `externalMacro(module:type:)` macro from the Swift standard library,
35823582
passing in the name of a type that contains the macro's implementation,
35833583
and the name of the module that contains that type.
35843584

3585-
[SwiftSyntax]: http://github.com/apple/swift-syntax/
3585+
[SwiftSyntax]: https://github.com/swiftlang/swift-syntax
35863586

35873587
Macros can be overloaded,
35883588
following the same model used by functions.

TSPL.docc/ReferenceManual/LexicalStructure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ The backticks aren't considered part of the identifier;
107107
The paragraph above produces a link-resolution warning
108108
because of a known issue with ` in code voice.
109109
110-
https://github.com/apple/swift-book/issues/71
111-
https://github.com/apple/swift-markdown/issues/93
110+
https://github.com/swiftlang/swift-book/issues/71
111+
https://github.com/swiftlang/swift-markdown/issues/93
112112
-->
113113

114114
Inside a closure with no explicit parameter names,
@@ -133,8 +133,8 @@ The formal grammar below for 'identifier'
133133
produces a link-resolution warning
134134
because of a known issue with ` in code voice.
135135
136-
https://github.com/apple/swift-book/issues/71
137-
https://github.com/apple/swift-markdown/issues/93
136+
https://github.com/swiftlang/swift-book/issues/71
137+
https://github.com/swiftlang/swift-markdown/issues/93
138138
-->
139139

140140
> Grammar of an identifier:
@@ -971,7 +971,7 @@ and `/\d/` matches a single digit.
971971
of the supported syntax here.
972972
(Unified dialect/superset of POSIX + PCRE 2 + Oniguruma + .NET)
973973
974-
https://github.com/apple/swift-experimental-string-processing/blob/main/Sources/_StringProcessing/Regex/Core.swift
974+
https://github.com/swiftlang/swift-experimental-string-processing/blob/main/Sources/_StringProcessing/Regex/Core.swift
975975
976976
Regex literals and the DSL take different approaches to captures.
977977
The literals give you more type safety.

TSPL.docc/ReferenceManual/Statements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,8 @@ the `#warning` and `#error` statements emit a diagnostic during compilation.
13161316
This behavior is now provided by
13171317
the [`warning(_:)`][] and [`error(_:)`][] macros in the Swift standard library.
13181318

1319-
[`warning(_:)`]: http://developer.apple.com/documentation/swift/documentation/swift/warning(_:)
1320-
[`error(_:)`]: http://developer.apple.com/documentation/swift/documentation/swift/error(_:)
1319+
[`warning(_:)`]: https://developer.apple.com/documentation/swift/warning(_:)
1320+
[`error(_:)`]: https://developer.apple.com/documentation/swift/error(_:)
13211321

13221322
## Availability Condition
13231323

TSPL.docc/ReferenceManual/Types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ because those types are already boxed protocol types.
975975

976976
<!--
977977
Contrast P.Type with (any P.Type) and (any P).Type
978-
https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md#metatypes
978+
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md#metatypes
979979
-->
980980

981981
> Grammar of a boxed protocol type:

TSPL.docc/header-staging.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h3>Important</h3>
1717
</p>
1818
<p>
1919
For the current shipping book, see <a href="https://docs.swift.org/swift-book/documentation/the-swift-programming-language/">Swift.org</a>.
20-
To contribute to this documentation, see the <a href="https://github.com/apple/swift-book">swift-book project</a> on GitHub.
20+
To contribute to this documentation, see the <a href="https://github.com/swiftlang/swift-book">swift-book project</a> on GitHub.
2121
</p>
2222
</aside>
2323
</div>

bin/preflight

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ xpath -q -n -e '//link/@destination' |
4545
sort -u | cut -f2 -d= | grep -v '^"doc:' | sed 's/^"//; s/"$//' |
4646
while read url
4747
do
48-
if curl --silent --output /dev/null --fail --head $url
48+
if curl --silent --output /dev/null --location --fail --head $url
4949
then
5050
echo " $url"
5151
else

0 commit comments

Comments
 (0)