doc: fix typo in pathToFileURL example

PR-URL: https://github.com/nodejs/node/pull/33418
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
pull/33529/head
Antoine du HAMEL 2020-05-15 10:26:20 +02:00 committed by Ruben Bridgewater
parent f251533335
commit a3f47b1114
1 changed files with 2 additions and 2 deletions

View File

@ -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