@tanstack/highlight
Version:
Tiny class-based syntax highlighting for documentation.
12 lines (11 loc) • 560 B
JavaScript
import { compiledWordLanguage as simpleLanguage } from '../internal/word-language.js';
// Vocabulary adapted from Highlight.js 11.11.1, see NOTICE.md.
export const nix = /* @__PURE__ */ simpleLanguage({
name: "nix",
wordCharacters: "\\w$'-",
aliases: ["nixos"],
comments: /*|\/\*[\s\S]*?(?:\*\/|(?![\s\S]))/,
strings: /\'\'(?:\'\'\'|\'\'\$\{|\'\'\\[\s\S]|(?!\'\')[\s\S])*(?:\'\'|(?![\s\S]))|"(?:\\[\s\S]|[^"\\])*(?:"|(?![\s\S]))/,
keywords: "assert else if in inherit let or rec then with",
literals: "false null true",
});