Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: fix typo in pathToFileURL example
  • Loading branch information
aduh95 committed May 15, 2020
commit 92a2c2fef19e5b417414a630dcb37a7ccc33096f
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