@@ -148,7 +148,7 @@ the `require.resolve()` function.
148148Putting together all of the above, here is the high-level algorithm
149149in pseudocode of what ` require() ` does:
150150
151- ``` text
151+ < pre >
152152require(X) from module at path Y
1531531. If X is a core module,
154154 a. return the core module
@@ -210,7 +210,7 @@ LOAD_PACKAGE_IMPORTS(X, DIR)
2102102. If no scope was found, return.
2112113. If the SCOPE/package.json "imports" is null or undefined, return.
2122124. let MATCH = PACKAGE_IMPORTS_RESOLVE(X, pathToFileurl("https://github.com/nodejs/node/commit/SCOPE"),
213- ["node", "require"]) defined in the ESM resolver.
213+ ["node", "require"]) < a href = " esm.md#resolver-algorithm-specification " > defined in the ESM resolver</ a > .
2142145. RESOLVE_ESM_MATCH(MATCH).
215215
216216LOAD_PACKAGE_EXPORTS(X, DIR)
@@ -221,7 +221,7 @@ LOAD_PACKAGE_EXPORTS(X, DIR)
2212213. Parse DIR/NAME/package.json, and look for "exports" field.
2222224. If "exports" is null or undefined, return.
2232235. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileurl("https://github.com/nodejs/node/commit/DIR/NAME"), "." + SUBPATH,
224- `package.json` "exports", ["node", "require"]) defined in the ESM resolver.
224+ `package.json` "exports", ["node", "require"]) < a href = " esm.md#resolver-algorithm-specification " > defined in the ESM resolver</ a > .
2252256. RESOLVE_ESM_MATCH(MATCH)
226226
227227LOAD_PACKAGE_SELF(X, DIR)
@@ -231,7 +231,7 @@ LOAD_PACKAGE_SELF(X, DIR)
2312314. If the SCOPE/package.json "name" is not the first segment of X, return.
2322325. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileurl("https://github.com/nodejs/node/commit/SCOPE"),
233233 "." + X.slice("name".length), `package.json` "exports", ["node", "require"])
234- defined in the ESM resolver.
234+ < a href = " esm.md#resolver-algorithm-specification " > defined in the ESM resolver</ a > .
2352356. RESOLVE_ESM_MATCH(MATCH)
236236
237237RESOLVE_ESM_MATCH(MATCH)
@@ -244,7 +244,7 @@ RESOLVE_ESM_MATCH(MATCH)
244244 a. LOAD_AS_FILE(RESOLVED_PATH)
245245 b. LOAD_AS_DIRECTORY(RESOLVED_PATH)
2462465. THROW "not found"
247- ```
247+ </ pre >
248248
249249## Caching
250250
0 commit comments