Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function highlightAllUnder
import { highlightAllUnder } from "https://deno.land/x/frugal@0.5.0/docs/dep/prism.ts";

Fetches all the descendants of container that have a .language-xxxx class and then calls Prism.highlightElement on each one of them.

The following hooks will be run:

  1. before-highlightall
  2. All hooks of Prism.highlightElement for each element.

Parameters

container: ParentNode

The root element, whose descendants that have a .language-xxxx class will be highlighted.

optional
async: boolean
optional
callback: HighlightCallback