Skip to content

Commit de608c3

Browse files
aduh95codebytere
authored andcommitted
doc: fix typo in pathToFileURL example
PR-URL: #33418 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 47396a4 commit de608c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/url.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,8 @@ pathToFileURL(__filename); // Correct: file:///C:/... (Windows)
999999
new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
10001000
pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
10011001

1002-
new URL('/some/path%.js', 'file:'); // Incorrect: file:///some/path%
1003-
pathToFileURL('/some/path%.js'); // Correct: file:///some/path%25 (POSIX)
1002+
new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
1003+
pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
10041004
```
10051005

10061006
## Legacy URL API

0 commit comments

Comments
 (0)