Skip to main content

highlight-code

ai-research-agent / interface/highlight-code

HTML Utilities

highlightCodeSyntax()

function highlightCodeSyntax(node): Object

Take a node and make it so that any code blocks are syntax highlighted.

Parameters

ParameterTypeDescription

node

Node

The node to be highlighted.

Returns

Object

An object with a destroy method to clean up the mutation observer.

Example