Skip to content

Commit 0bade6e

Browse files
authored
Editorial: properly format enum strings
Fixes #133.
1 parent 762a4d9 commit 0bade6e

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

index.bs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ a <dfn export for="file system locator" id=locator-root>root</dfn> (a [=file sys
244244
Issue(109): Consider giving each locator a [=storage bucket=].
245245

246246
A <dfn export>file locator</dfn> is a [=/file system locator=] whose
247-
[=file system locator/kind=] is {{FileSystemHandleKind/"file"}}.
247+
[=file system locator/kind=] is "{{FileSystemHandleKind/file}}".
248248
A <dfn export>directory locator</dfn> is a [=/file system locator=] whose
249-
[=file system locator/kind=] is {{FileSystemHandleKind/"directory"}}.
249+
[=file system locator/kind=] is "{{FileSystemHandleKind/directory}}".
250250

251251
A <dfn export>file system root</dfn> is an opaque [=string=] whose value is
252252
[=implementation-defined=].
@@ -255,7 +255,7 @@ A <dfn export>file system root</dfn> is an opaque [=string=] whose value is
255255
whichs [=locate an entry|locates to=] a [=file entry=] |entry| that conceptually
256256
exists at the path `data/drafts/example.txt` relative to the root directory of
257257
a [=/bucket file system=],
258-
|locator|'s [=file system locator/kind=] has to be {{FileSystemHandleKind/"file"}},
258+
|locator|'s [=file system locator/kind=] has to be "{{FileSystemHandleKind/file}}",
259259
|locator|'s [=file system locator/path=] has to be « "`data`", "`drafts`", "`example.txt`" », and
260260
|locator|'s [=file system locator/root=] might include relevant identifying
261261
information such as the [=storage bucket=] and the disk drive.
@@ -377,8 +377,8 @@ Their [=deserialization steps=], given |serialized| and |value| are:
377377

378378
<div class="note domintro">
379379
: |handle| . {{FileSystemHandle/kind}}
380-
:: Returns {{FileSystemHandleKind/"file"}} if |handle| is a {{FileSystemFileHandle}},
381-
or {{FileSystemHandleKind/"directory"}} if |handle| is a {{FileSystemDirectoryHandle}}.
380+
:: Returns "{{FileSystemHandleKind/file}}" if |handle| is a {{FileSystemFileHandle}},
381+
or "{{FileSystemHandleKind/directory}}" if |handle| is a {{FileSystemDirectoryHandle}}.
382382

383383
This can be used to distinguish files from directories when iterating over the contents
384384
of a directory.
@@ -433,15 +433,15 @@ interface FileSystemFileHandle : FileSystemHandle {
433433
</xmp>
434434

435435
Note: A {{FileSystemFileHandle}}'s associated [=FileSystemHandle/locator=]'s
436-
[=file system locator/kind=] is {{FileSystemHandleKind/"file"}}.
436+
[=file system locator/kind=] is "{{FileSystemHandleKind/file}}".
437437

438438
<div algorithm>
439439
To
440440
<dfn data-lt="creating a child FileSystemFileHandle">create a child `FileSystemFileHandle`</code></dfn>
441441
given a [=directory locator=] |parentLocator| and a string |name| in a [=/Realm=] |realm|:
442442

443443
1. Let |handle| be a [=new=] {{FileSystemFileHandle}} in |realm|.
444-
1. Let |childType| be {{FileSystemHandleKind/"file"}}.
444+
1. Let |childType| be "{{FileSystemHandleKind/file}}".
445445
1. Let |childRoot| be a copy of |parentLocator|'s [=file system locator/root=].
446446
1. Let |childPath| be the result of [=list/clone|cloning=] |parentLocator|'s
447447
[=file system locator/path=] and [=list/append|appending=] |name|.
@@ -461,7 +461,7 @@ in a [=/Realm=] |realm|:
461461

462462
1. Let |handle| be a [=new=] {{FileSystemFileHandle}} in |realm|.
463463
1. Set |handle|'s [=FileSystemHandle/locator=] to a [=/file system locator=] whose
464-
[=file system locator/kind=] is {{FileSystemHandleKind/"file"}},
464+
[=file system locator/kind=] is "{{FileSystemHandleKind/file}}",
465465
[=file system locator/root=] is |root|, and
466466
[=file system locator/path=] is |path|.
467467
1. Return |handle|.
@@ -688,15 +688,15 @@ interface FileSystemDirectoryHandle : FileSystemHandle {
688688
</xmp>
689689

690690
Note: A {{FileSystemDirectoryHandle}}'s associated [=FileSystemHandle/locator=]'s
691-
[=file system locator/kind=] is {{FileSystemHandleKind/"directory"}}.
691+
[=file system locator/kind=] is "{{FileSystemHandleKind/directory}}".
692692

693693
<div algorithm>
694694
To
695695
<dfn data-lt="creating a child FileSystemDirectoryHandle">create a child `FileSystemDirectoryHandle`</dfn>
696696
given a [=directory locator=] |parentLocator| and a string |name| in a [=/Realm=] |realm|:
697697

698698
1. Let |handle| be a [=new=] {{FileSystemDirectoryHandle}} in |realm|.
699-
1. Let |childType| be {{FileSystemHandleKind/"directory"}}.
699+
1. Let |childType| be "{{FileSystemHandleKind/directory}}".
700700
1. Let |childRoot| be a copy of |parentLocator|'s [=file system locator/root=].
701701
1. Let |childPath| be the result of [=list/clone|cloning=] |parentLocator|'s
702702
[=file system locator/path=] and [=list/append|appending=] |name|.
@@ -716,7 +716,7 @@ in a [=/Realm=] |realm|:
716716

717717
1. Let |handle| be a [=new=] {{FileSystemDirectoryHandle}} in |realm|.
718718
1. Set |handle|'s [=FileSystemHandle/locator=] to a [=/file system locator=] whose
719-
[=file system locator/kind=] is {{FileSystemHandleKind/"directory"}},
719+
[=file system locator/kind=] is "{{FileSystemHandleKind/directory}}",
720720
[=file system locator/root=] is |root|, and
721721
[=file system locator/path=] is |path|.
722722
1. Return |handle|.
@@ -1223,8 +1223,8 @@ runs these steps:
12231223
[=file system access result/error name=] and abort these steps.
12241224

12251225
1. Let |command| be |input|["{{WriteParams/type}}"] if
1226-
|input| is a [=/dictionary=]; otherwise {{WriteCommandType/"write"}}.
1227-
1. If |command| is {{WriteCommandType/"write"}}:
1226+
|input| is a [=/dictionary=]; otherwise "{{WriteCommandType/write}}".
1227+
1. If |command| is "{{WriteCommandType/write}}":
12281228
1. If |input| is `undefined` or |input| is a [=/dictionary=] and
12291229
|input|["{{WriteParams/data}}"] does not [=map/exists|exist=],
12301230
[=/reject=] |p| with a {{TypeError}} and abort these steps.
@@ -1275,14 +1275,14 @@ runs these steps:
12751275
1. Set |stream|'s [=[[seekOffset]]=] to |writePosition| + |data|'s
12761276
[=byte sequence/length=].
12771277
1. [=/Resolve=] |p|.
1278-
1. Otherwise, if |command| is {{WriteCommandType/"seek"}}:
1278+
1. Otherwise, if |command| is "{{WriteCommandType/seek}}":
12791279
1. [=Assert=]: |chunk| is a [=/dictionary=].
12801280
1. If |chunk|["{{WriteParams/position}}"] does not [=map/exists|exist=],
12811281
[=/reject=] |p| with a {{TypeError}} and abort these steps.
12821282
1. Set |stream|'s [=[[seekOffset]]=] to
12831283
|chunk|["{{WriteParams/position}}"].
12841284
1. [=/Resolve=] |p|.
1285-
1. Otherwise, if |command| is {{WriteCommandType/"truncate"}}:
1285+
1. Otherwise, if |command| is "{{WriteCommandType/truncate}}":
12861286
1. [=Assert=]: |chunk| is a [=/dictionary=].
12871287
1. If |chunk|["{{WriteParams/size}}"] does not [=map/exists|exist=],
12881288
[=/reject=] |p| with a {{TypeError}} and abort these steps.
@@ -1315,7 +1315,7 @@ runs these steps:
13151315
<div class="note domintro">
13161316
: await |stream| . {{FileSystemWritableFileStream/write()|write}}(|data|)
13171317
: await |stream| . {{FileSystemWritableFileStream/write()|write}}({
1318-
{{WriteParams/type}}: {{WriteCommandType/"write"}},
1318+
{{WriteParams/type}}: "{{WriteCommandType/write}}",
13191319
{{WriteParams/data}}: |data| })
13201320
:: Writes the content of |data| into the file associated with |stream| at the current file
13211321
cursor offset.
@@ -1324,7 +1324,7 @@ runs these steps:
13241324
Changes are typically written to a temporary file instead.
13251325

13261326
: await |stream| . {{FileSystemWritableFileStream/write()|write}}({
1327-
{{WriteParams/type}}: {{WriteCommandType/"write"}},
1327+
{{WriteParams/type}}: "{{WriteCommandType/write}}",
13281328
{{WriteParams/position}}: |position|,
13291329
{{WriteParams/data}}: |data| })
13301330
:: Writes the content of |data| into the file associated with |stream| at |position|
@@ -1335,12 +1335,12 @@ runs these steps:
13351335
Changes are typically written to a temporary file instead.
13361336

13371337
: await |stream| . {{FileSystemWritableFileStream/write()|write}}({
1338-
{{WriteParams/type}}: {{WriteCommandType/"seek"}},
1338+
{{WriteParams/type}}: "{{WriteCommandType/seek}}",
13391339
{{WriteParams/position}}: |position| })
13401340
:: Updates the current file cursor offset the |position| bytes from the top of the file.
13411341

13421342
: await |stream| . {{FileSystemWritableFileStream/write()|write}}({
1343-
{{WriteParams/type}}: {{WriteCommandType/"truncate"}},
1343+
{{WriteParams/type}}: "{{WriteCommandType/truncate}}",
13441344
{{WriteParams/size}}: |size| })
13451345
:: Resizes the file associated with |stream| to be |size| bytes long. If |size| is larger than
13461346
the current file size this pads the file with null bytes, otherwise it truncates the file.
@@ -1376,7 +1376,7 @@ The <dfn method for=FileSystemWritableFileStream>seek(|position|)</dfn> method s
13761376

13771377
1. Let |writer| be the result of [=WritableStream/getting a writer=] for [=this=].
13781378
1. Let |result| be the result of [=WritableStreamDefaultWriter/writing a chunk=] to |writer| given
1379-
«[ "{{WriteParams/type}}" → {{WriteCommandType/"seek"}}, "{{WriteParams/position}}" →
1379+
«[ "{{WriteParams/type}}" → "{{WriteCommandType/seek}}", "{{WriteParams/position}}" →
13801380
|position| ]».
13811381
1. [=WritableStreamDefaultWriter/Release=] |writer|.
13821382
1. Return |result|.
@@ -1403,7 +1403,7 @@ The <dfn method for=FileSystemWritableFileStream>truncate(|size|)</dfn> method s
14031403

14041404
1. Let |writer| be the result of [=WritableStream/getting a writer=] for [=this=].
14051405
1. Let |result| be the result of [=WritableStreamDefaultWriter/writing a chunk=] to |writer| given
1406-
«[ "{{WriteParams/type}}" → {{WriteCommandType/"truncate"}}, "{{WriteParams/size}}" →
1406+
«[ "{{WriteParams/type}}" → "{{WriteCommandType/truncate}}", "{{WriteParams/size}}" →
14071407
|size| ]».
14081408
1. [=WritableStreamDefaultWriter/Release=] |writer|.
14091409
1. Return |result|.

0 commit comments

Comments
 (0)