Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@node-core/doc-kit",
"type": "module",
"version": "1.3.3",
"version": "1.3.4",
"repository": {
"type": "git",
"url": "git+https://github.com/nodejs/doc-kit.git"
Expand Down
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