Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/utils/highlighter.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

import { endianness } from 'node:os';

import createHighlighter from '@node-core/rehype-shiki';
import { h as createElement } from 'hastscript';
import { SKIP, visit } from 'unist-util-visit';
Expand Down Expand Up @@ -40,7 +42,10 @@ export const highlighter = await createHighlighter({
// riscv64 with sv39 has limited virtual memory space, where creating
// too many (>20) wasm memory instances fails.
// https://github.com/nodejs/node/pull/60591
wasm: process.arch !== 'riscv64',
//
// The wasm highlighter is currently not compatible with big endian.
// https://github.com/nodejs/node/pull/62512#issuecomment-4243469950
wasm: process.arch !== 'riscv64' && endianness() === 'LE',
});

/**
Expand Down
Loading