import { highlight } from "https://deno.land/x/frugal@0.5.0/docs/dep/prism.ts";
Low-level function, only use if you know what you’re doing. It accepts a string of text as input and the language definitions to use, and returns a string with the HTML produced.
The following hooks will be run:
before-tokenize
after-tokenize
wrap
: On each Prism.Token.
Examples
Prism.highlight('var foo = true;', Prism.languages.js, 'js');
Prism.highlight('var foo = true;', Prism.languages.js, 'js');
Parameters
grammar: Grammar
An object containing the tokens to use.
Usually a language definition like Prism.languages.markup
.