diff --git a/extending.html b/extending.html index 59101b6ff9..6abebd39bc 100644 --- a/extending.html +++ b/extending.html @@ -202,9 +202,9 @@

Parameters

-

Prism.highlight(text, grammar)

+

Prism.highlight(text, grammar, language)

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.

+ It accepts a string of text as input, the language definitions to use, and the name of the language, and returns a string with the HTML produced.

Parameters

@@ -212,6 +212,8 @@

Parameters

A string with the code to be highlighted.
grammar
An object containing the tokens to use. Usually a language definition like Prism.languages.markup
+
language
+
The name of the language definition passed to grammar. E.g. markup or javascript

Returns