MCPcopy Create free account
hub / github.com/api-platform/website / getOrCreateHighlighter

Function getOrCreateHighlighter

pwa/utils/highlighter.ts:6–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5// to avoid multiplication of highlighters during doc building
6export async function getOrCreateHighlighter() {
7 if (!highlighter) {
8 highlighter = await getHighlighter({
9 themes: ["github-light", "one-dark-pro"],
10 });
11 }
12 return highlighter;
13}
14
15export function getLoadedLanguages() {
16 return highlighter ? highlighter.getLoadedLanguages() : [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected