Skip to content

Commit 2fafd63

Browse files
vsemozhetbytBridgeAR
authored andcommitted
doc: fix nits in esm.md
* ```mjs -> ```js as our linting of doc code fragments does not recognize this tag, IIRC. * Add semicolons to a code fragment. * Fix ASCII sorting in bottom references. PR-URL: #29242 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
1 parent ed2293e commit 2fafd63

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/api/esm.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ from `data:text/javascript,import "./foo";` will fail to resolve since there
339339
is no concept of relative resolution for `data:` URLs. An example of a `data:`
340340
URLs being used is:
341341

342-
```mjs
343-
import 'data:text/javascript,console.log("hello!");'
344-
import _ from 'data:application/json,"world!"'
342+
```js
343+
import 'data:text/javascript,console.log("hello!");';
344+
import _ from 'data:application/json,"world!"';
345345
```
346346

347347
## import.meta
@@ -894,18 +894,18 @@ $ node --experimental-modules --es-module-specifier-resolution=node index
894894
success!
895895
```
896896
897+
[CommonJS]: modules.html
898+
[ECMAScript-modules implementation]: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md
899+
[ES Module Integration Proposal for Web Assembly]: https://github.com/webassembly/esm-integration
900+
[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md
897901
[Terminology]: #esm_terminology
902+
[WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script
898903
[`data:` URLs]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
899904
[`export`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export
900-
[`import`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
901905
[`import()`]: #esm_import-expressions
902906
[`import.meta.url`]: #esm_import_meta
907+
[`import`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
903908
[`module.createRequire()`]: modules.html#modules_module_createrequire_filename
904-
[CommonJS]: modules.html
905-
[ECMAScript-modules implementation]: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md
906-
[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md
907-
[special scheme]: https://url.spec.whatwg.org/#special-scheme
908-
[WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script
909-
[ES Module Integration Proposal for Web Assembly]: https://github.com/webassembly/esm-integration
910909
[dynamic instantiate hook]: #esm_dynamic_instantiate_hook
910+
[special scheme]: https://url.spec.whatwg.org/#special-scheme
911911
[the official standard format]: https://tc39.github.io/ecma262/#sec-modules

0 commit comments

Comments
 (0)