Skip to content

Commit

Permalink
Docs: Added missing parameter (#1774)
Browse files Browse the repository at this point in the history
This adds a missing parameter to the `Prism.highlight` documentation.
  • Loading branch information
RunDevelopment authored Mar 10, 2019
1 parent 832a964 commit 18f2921
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extending.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,18 @@ <h2>Parameters</h2>
</section>

<section id="highlight">
<h1><code>Prism.highlight(text, grammar)</code></h1>
<h1><code>Prism.highlight(text, grammar, language)</code></h1>
<p>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.</p>
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.</p>

<h2>Parameters</h2>
<dl>
<dt>text</dt>
<dd>A string with the code to be highlighted.</dd>
<dt>grammar</dt>
<dd>An object containing the tokens to use. Usually a language definition like <code>Prism.languages.markup</code></dd>
<dt>language</dt>
<dd>The name of the language definition passed to <code>grammar</code>. E.g. <code>markup</code> or <code>javascript</code></dd>
</dl>

<h2>Returns</h2>
Expand Down

0 comments on commit 18f2921

Please sign in to comment.