From 434d24baa679ded2ee8049f7c8f5acaf1343afbe Mon Sep 17 00:00:00 2001 From: Jan Krems Date: Fri, 25 Oct 2019 08:54:25 -0700 Subject: [PATCH] doc: fix numbering in require algorithm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/pull/29327 PR-URL: https://github.com/nodejs/node/pull/30117 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- doc/api/modules.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index 3d27244fac4e16..9bf02ff0bbf4b1 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -159,8 +159,8 @@ require(X) from module at path Y 3. If X begins with './' or '/' or '../' a. LOAD_AS_FILE(Y + X) b. LOAD_AS_DIRECTORY(Y + X) -5. LOAD_NODE_MODULES(X, dirname(Y)) -4. LOAD_SELF_REFERENCE(X, dirname(Y)) +4. LOAD_NODE_MODULES(X, dirname(Y)) +5. LOAD_SELF_REFERENCE(X, dirname(Y)) 6. THROW "not found" LOAD_AS_FILE(X) @@ -222,8 +222,8 @@ LOAD_NODE_MODULES(X, START) 1. let DIRS = NODE_MODULES_PATHS(START) 2. for each DIR in DIRS: a. let FILE_PATH = RESOLVE_BARE_SPECIFIER(DIR, X) - a. LOAD_AS_FILE(FILE_PATH) - b. LOAD_AS_DIRECTORY(FILE_PATH) + b. LOAD_AS_FILE(FILE_PATH) + c. LOAD_AS_DIRECTORY(FILE_PATH) RESOLVE_BARE_SPECIFIER(DIR, X) 1. Try to interpret X as a combination of name and subpath where the name