import * as frugal from "https://deno.land/x/frugal@0.5.0/docs/dep/prism.ts";
Variables
By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
| |
By default, Prism will attempt to highlight all code elements (by calling Prism.highlightAll) on the current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load additional languages or plugins yourself. | |
Functions
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. | |
This is the most high-level function in Prism’s API.
It fetches all the elements that have a | |
Fetches all the descendants of | |
Highlights the code inside a single element. | |
This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input and the language definitions to use, and returns an array with the tokenized code. |
Interfaces
The expansion of a simple |
Type Aliases
A function which will be invoked after an element was successfully highlighted. | |