Skip to content

Commit 367a7f6

Browse files
committed
Replace fenced code blocks with indentions.
1 parent 837f6e0 commit 367a7f6

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

stdlib/public/Observation/Sources/Observation/Observable.swift

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,16 @@
2929
/// following code applies the `Observable` macro to the type `Car` making it
3030
/// observable:
3131
///
32-
/// ```swift
33-
/// @Observable
34-
/// class Car {
35-
/// var name: String = ""
36-
/// var needsRepairs: Bool = false
37-
///
38-
/// init(name: String, needsRepairs: Bool = false) {
39-
/// self.name = name
40-
/// self.needsRepairs = needsRepairs
41-
/// }
42-
///}
43-
///```
32+
/// @Observable
33+
/// class Car {
34+
/// var name: String = ""
35+
/// var needsRepairs: Bool = false
36+
///
37+
/// init(name: String, needsRepairs: Bool = false) {
38+
/// self.name = name
39+
/// self.needsRepairs = needsRepairs
40+
/// }
41+
/// }
4442
@available(SwiftStdlib 5.9, *)
4543
#if OBSERVATION_SUPPORTS_PEER_MACROS
4644
@attached(member, names: named(_$observationRegistrar), named(access), named(withMutation))

stdlib/public/Observation/Sources/Observation/ObservationTracking.swift

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,15 @@ public struct ObservationTracking {
8888
/// to the name of cars, but it doesn't track changes to any other property of
8989
/// `Car`:
9090
///
91-
/// ```swift
92-
/// func render() {
93-
/// withObservationTracking {
94-
/// for car in cars {
95-
/// print(car.name)
91+
/// func render() {
92+
/// withObservationTracking {
93+
/// for car in cars {
94+
/// print(car.name)
95+
/// }
96+
/// } onChange: {
97+
/// print("Schedule renderer.")
9698
/// }
97-
/// } onChange: {
98-
/// print("Schedule renderer.")
9999
/// }
100-
/// }
101-
/// ```
102100
///
103101
/// - Parameters:
104102
/// - apply: A closure that contains properties to track.

0 commit comments

Comments
 (0)