Skip to content

Commit 5203dac

Browse files
authored
Use valid syntax for Wasm comments in code examples (#43)
1 parent 42c0378 commit 5203dac

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

proposals/esm-integration/EXAMPLES.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Note: because these are snapshots of values, this does not maintain the live-bin
3131
##### Function imports
3232

3333
```wasm
34-
// main.wasm
34+
;; main.wasm
3535
(module
3636
(import "./counter.js" "getCount" (func $getCount (func (result i32))))
3737
)
@@ -51,7 +51,7 @@ export {getCount};
5151
@TODO add example of WebAssembly.Global being updated
5252

5353
```wasm
54-
// main.wasm
54+
;; main.wasm
5555
(module
5656
(import "./counter.js" "count" (global i32))
5757
)
@@ -96,7 +96,7 @@ increment();
9696
console.log(count.value); // logs 6
9797
```
9898
```wasm
99-
// counter.wasm
99+
;; counter.wasm
100100
(module
101101
(func $increment
102102
get_global 0
@@ -115,13 +115,13 @@ Wasm exports can be imported as accurate, immutable bindings to other wasm modul
115115
#### Example
116116

117117
```wasm
118-
// main.wasm
118+
;; main.wasm
119119
(module
120120
(import "./counter.wasm" "count" (global i32))
121121
(import "./counter.wasm" "increment" (func $increment (result i32)))
122122
)
123123
124-
// counter.wasm
124+
;; counter.wasm
125125
(module
126126
(func $increment
127127
get_global 0
@@ -140,7 +140,7 @@ Any wasm exports that are re-exported via a JS module will be available to the o
140140
#### Example
141141

142142
```wasm
143-
// main.wasm
143+
;; main.wasm
144144
(module
145145
(import "./a.js" "memoryExport" (memory 0))
146146
)
@@ -150,7 +150,7 @@ Any wasm exports that are re-exported via a JS module will be available to the o
150150
export {memoryExport} from "./b.wasm";
151151
```
152152
```wasm
153-
// b.wasm
153+
;; b.wasm
154154
(module
155155
(memory 1)
156156
(export "memoryExport" (memory 0))
@@ -186,7 +186,7 @@ export function functionExport() {
186186
}
187187
```
188188
```wasm
189-
// b.wasm
189+
;; b.wasm
190190
(module
191191
(memory 1)
192192
(export "memoryExport" (memory 0))
@@ -216,7 +216,7 @@ export function functionExport() {
216216
#### Examples
217217

218218
```wasm
219-
// a.wasm
219+
;; a.wasm
220220
(module
221221
(memory 1)
222222
(export "memoryExport" (memory 0))

0 commit comments

Comments
 (0)