Skip to content

Commit 969ae33

Browse files
committed
test: markdown formatting callouts
1 parent 6c5c53d commit 969ae33

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎component-model/src/design/migrating-to-p3.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ WASI 0.3 replaces every `wasi:io` resource with a Canonical ABI primitive. The t
3333

3434
A WASI 0.2 read call returned a single `input-stream` resource and surfaced terminal errors only as you consumed it. WASI 0.3 splits those concerns: the call returns a `stream<u8>` for the data and a `future<result<_, error-code>>` for the outcome, packed into a tuple.
3535

36-
```wit
36+
```wit nofmt
3737
// WASI 0.2 (filesystem read)
3838
read-via-stream: func(offset: filesize) -> result<input-stream, error-code>;
3939
@@ -47,7 +47,7 @@ In WASI 0.3, the caller does not have to drain the stream to learn whether the r
4747

4848
WASI 0.2 write paths handed a guest some host-owned resource (an `output-stream`) and let the guest push bytes into it. WASI 0.3 inverts that: the guest supplies the data as a `stream<u8>` value, and the host returns a `future` that resolves once it has finished consuming the stream.
4949

50-
```wit
50+
```wit nofmt
5151
// WASI 0.2: receive an output-stream resource, write into it
5252
get-stdout: func() -> output-stream;
5353
@@ -59,7 +59,7 @@ write-via-stream: func(data: stream<u8>) -> future<result<_, error-code>>;
5959

6060
WASI 0.2 modeled operations that could suspend as a `start-foo` / `finish-foo` pair, with a `pollable` for readiness in between. WASI 0.3 collapses each pair into a single call:
6161

62-
```wit
62+
```wit nofmt
6363
// WASI 0.2
6464
start-connect: func(network: borrow<network>, remote-address: ip-socket-address) -> result<_, error-code>;
6565
finish-connect: func() -> result<tuple<input-stream, output-stream>, error-code>;
@@ -77,7 +77,7 @@ The complete per-interface diff lives on [WASI 0.3](https://wasi.dev/releases/wa
7777
- **`wasi:io` is gone.** The package has no 0.3.0 release. Every resource it exposed (`pollable`, `input-stream`, `output-stream`) is replaced by a Component Model primitive, per the [concept mapping](#concept-mapping) above.
7878
- **`wasi:http` collapses from nine resources to two.** The incoming/outgoing × request/response/body matrix plus `future-trailers`, `future-incoming-response`, and `response-outparam` all become `request` and `response`, with `stream<u8>` bodies and a `future` for trailers. The handler is now an `async func`:
7979

80-
```wit
80+
```wit nofmt
8181
// WASI 0.2
8282
handle: func(request: incoming-request, response-out: response-outparam);
8383

‎component-model/src/tutorial.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ These files can be found in the component book repository in the [`examples/tuto
4242
world adder {
4343
export add;
4444
}
45-
```
45+
```
4646

47-
```wit
47+
```wit
4848
// wit/calculator/world.wit
4949
package docs:calculator@0.1.0;
5050
@@ -142,7 +142,7 @@ default_registry = "ghcr.io"
142142

143143
[namespace_registries]
144144
# Tell wkg that the component-book WITs can be found at ghcr.io/bytecodealliance/docs
145-
docs = { registry = "docs", metadata = { preferredProtocol = "oci", "oci" = {registry = "ghcr.io", namespacePrefix = "bytecodealliance/" } } }
145+
docs = { registry = "docs", metadata = { preferredProtocol = "oci", "oci" = { registry = "ghcr.io", namespacePrefix = "bytecodealliance/" } } }
146146
```
147147

148148
> [!NOTE]

0 commit comments

Comments
 (0)