From de608c312428cbd3c43cb44fe33227b0bbde8366 Mon Sep 17 00:00:00 2001 From: Antoine du HAMEL Date: Fri, 15 May 2020 10:26:20 +0200 Subject: [PATCH] doc: fix typo in pathToFileURL example PR-URL: https://github.com/nodejs/node/pull/33418 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/url.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 3da8adbe8568d2..1e9649d5b60e04 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -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