Skip to content

Commit 77e597f

Browse files
committed
doc: fix ES module code blocks rendering in modules.md
The two consecutive `mjs` code blocks in the "Loading ECMAScript modules using require()" section were being incorrectly grouped into a CJS/ESM toggle tab by doc-kit's highlighter. Add text between the two code blocks so they render as independent code blocks.
1 parent ae228c1 commit 77e597f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/api/modules.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,15 @@ return the [module namespace object][]. In this case it is similar to dynamic
217217
`import()` but is run synchronously and returns the name space object
218218
directly.
219219

220-
With the following ES Modules:
220+
With the following ES module `distance.mjs`:
221221

222222
```mjs
223223
// distance.mjs
224224
export function distance(a, b) { return Math.sqrt((b.x - a.x) ** 2 + (b.y - a.y) ** 2); }
225225
```
226226

227+
`point.mjs`:
228+
227229
```mjs
228230
// point.mjs
229231
export default class Point {

0 commit comments

Comments
 (0)