We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d00fa8 commit fd7534dCopy full SHA for fd7534d
1 file changed
src/utils/highlighter.mjs
@@ -1,5 +1,7 @@
1
'use strict';
2
3
+import { endianness } from 'node:os';
4
+
5
import createHighlighter from '@node-core/rehype-shiki';
6
import { h as createElement } from 'hastscript';
7
import { SKIP, visit } from 'unist-util-visit';
@@ -40,7 +42,10 @@ export const highlighter = await createHighlighter({
40
42
// riscv64 with sv39 has limited virtual memory space, where creating
41
43
// too many (>20) wasm memory instances fails.
44
// https://github.com/nodejs/node/pull/60591
- wasm: process.arch !== 'riscv64',
45
+ //
46
+ // The wasm highlighter is currently not compatible with big endian.
47
+ // https://github.com/nodejs/node/pull/62512#issuecomment-4243469950
48
+ wasm: process.arch !== 'riscv64' && endianness() === 'LE',
49
});
50
51
/**
0 commit comments