Skip to content

Commit

Permalink
doc: fix typo in pathToFileURL example
Browse files Browse the repository at this point in the history
PR-URL: #33418
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
aduh95 authored and codebytere committed Jul 8, 2020
1 parent 7c7f5c8 commit b599037
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,8 @@ pathToFileURL(__filename); // Correct: file:///C:/... (Windows)
new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)

new URL('/some/path%.js', 'file:'); // Incorrect: file:///some/path%
pathToFileURL('/some/path%.js'); // Correct: file:///some/path%25 (POSIX)
new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
```

## Legacy URL API
Expand Down

0 comments on commit b599037

Please sign in to comment.