Skip to content

Commit

Permalink
Docs: Minor improvement (#2513)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Aug 27, 2020
1 parent 5ad6cb2 commit 206dc80
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
8 changes: 6 additions & 2 deletions components/prism-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ var _ = {
*
* The following hooks will be run:
* 1. `before-highlightall`
* 2. All hooks of {@link Prism.highlightElement} for each element.
* 2. `before-all-elements-highlight`
* 3. All hooks of {@link Prism.highlightElement} for each element.
*
* @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
* @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
Expand Down Expand Up @@ -487,11 +488,14 @@ var _ = {
* The following hooks will be run:
* 1. `before-sanity-check`
* 2. `before-highlight`
* 3. All hooks of {@link Prism.highlight}. These hooks will only be run by the current worker if `async` is `true`.
* 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
* 4. `before-insert`
* 5. `after-highlight`
* 6. `complete`
*
* Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
* the element's language.
*
* @param {Element} element The element containing the code.
* It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
* @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
Expand Down
6 changes: 3 additions & 3 deletions docs/Prism.hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line656">line 656</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line660">line 660</a>
</li></ul></dd>


Expand Down Expand Up @@ -152,7 +152,7 @@ <h4 class="name" id=".add"><span class="type-signature">(static) </span>add<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line671">line 671</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line675">line 675</a>
</li></ul></dd>


Expand Down Expand Up @@ -314,7 +314,7 @@ <h4 class="name" id=".run"><span class="type-signature">(static) </span>run<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line688">line 688</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line692">line 692</a>
</li></ul></dd>


Expand Down
13 changes: 8 additions & 5 deletions docs/Prism.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h4 class="name" id=".highlight"><span class="type-signature">(static) </span>hi

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line597">line 597</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line601">line 601</a>
</li></ul></dd>


Expand Down Expand Up @@ -676,7 +676,7 @@ <h4 class="name" id=".highlightAllUnder"><span class="type-signature">(static) <

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line466">line 466</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line467">line 467</a>
</li></ul></dd>


Expand Down Expand Up @@ -721,6 +721,7 @@ <h4 class="name" id=".highlightAllUnder"><span class="type-signature">(static) <
<p>The following hooks will be run:</p>
<ol>
<li><code>before-highlightall</code></li>
<li><code>before-all-elements-highlight</code></li>
<li>All hooks of <a href="Prism.html#.highlightElement"><code>Prism.highlightElement</code></a> for each element.</li>
</ol>
</div>
Expand Down Expand Up @@ -910,7 +911,7 @@ <h4 class="name" id=".highlightElement"><span class="type-signature">(static) </

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line509">line 509</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line513">line 513</a>
</li></ul></dd>


Expand Down Expand Up @@ -955,11 +956,13 @@ <h4 class="name" id=".highlightElement"><span class="type-signature">(static) </
<ol>
<li><code>before-sanity-check</code></li>
<li><code>before-highlight</code></li>
<li>All hooks of <a href="Prism.html#.highlight"><code>Prism.highlight</code></a>. These hooks will only be run by the current worker if <code>async</code> is <code>true</code>.</li>
<li>All hooks of <a href="Prism.html#.highlight"><code>Prism.highlight</code></a>. These hooks will be run by an asynchronous worker if <code>async</code> is <code>true</code>.</li>
<li><code>before-insert</code></li>
<li><code>after-highlight</code></li>
<li><code>complete</code></li>
</ol>
<p>Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
the element's language.</p>
</div>


Expand Down Expand Up @@ -1154,7 +1157,7 @@ <h4 class="name" id=".tokenize"><span class="type-signature">(static) </span>tok

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line633">line 633</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line637">line 637</a>
</li></ul></dd>


Expand Down
8 changes: 4 additions & 4 deletions docs/Token.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h4 class="name" id="Token"><span class="type-signature"></span>new Token<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line722">line 722</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line726">line 726</a>
</li></ul></dd>


Expand Down Expand Up @@ -364,7 +364,7 @@ <h4 class="name" id="alias"><span class="type-signature"></span>alias<span class

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line749">line 749</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line753">line 753</a>
</li></ul></dd>


Expand Down Expand Up @@ -447,7 +447,7 @@ <h4 class="name" id="content"><span class="type-signature"></span>content<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line741">line 741</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line745">line 745</a>
</li></ul></dd>


Expand Down Expand Up @@ -524,7 +524,7 @@ <h4 class="name" id="type"><span class="type-signature"></span>type<span class="

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line732">line 732</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line736">line 736</a>
</li></ul></dd>


Expand Down
10 changes: 5 additions & 5 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h4 class="name" id="Grammar">Grammar</h4>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1157">line 1157</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1161">line 1161</a>
</li></ul></dd>


Expand Down Expand Up @@ -274,7 +274,7 @@ <h4 class="name" id="GrammarToken">GrammarToken</h4>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1136">line 1136</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1140">line 1140</a>
</li></ul></dd>


Expand Down Expand Up @@ -559,7 +559,7 @@ <h4 class="name" id="HighlightCallback"><span class="type-signature"></span>High

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1165">line 1165</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1169">line 1169</a>
</li></ul></dd>


Expand Down Expand Up @@ -713,7 +713,7 @@ <h4 class="name" id="HookCallback"><span class="type-signature"></span>HookCallb

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1175">line 1175</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line1179">line 1179</a>
</li></ul></dd>


Expand Down Expand Up @@ -859,7 +859,7 @@ <h4 class="name" id="TokenStream">TokenStream</h4>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line754">line 754</a>
<a href="prism-core.js.html">prism-core.js</a>, <a href="prism-core.js.html#line758">line 758</a>
</li></ul></dd>


Expand Down
8 changes: 6 additions & 2 deletions docs/prism-core.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ <h1 class="page-title">prism-core.js</h1>
*
* The following hooks will be run:
* 1. `before-highlightall`
* 2. All hooks of {@link Prism.highlightElement} for each element.
* 2. `before-all-elements-highlight`
* 3. All hooks of {@link Prism.highlightElement} for each element.
*
* @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
* @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
Expand Down Expand Up @@ -540,11 +541,14 @@ <h1 class="page-title">prism-core.js</h1>
* The following hooks will be run:
* 1. `before-sanity-check`
* 2. `before-highlight`
* 3. All hooks of {@link Prism.highlight}. These hooks will only be run by the current worker if `async` is `true`.
* 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
* 4. `before-insert`
* 5. `after-highlight`
* 6. `complete`
*
* Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
* the element's language.
*
* @param {Element} element The element containing the code.
* It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
* @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
Expand Down
8 changes: 6 additions & 2 deletions prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ var _ = {
*
* The following hooks will be run:
* 1. `before-highlightall`
* 2. All hooks of {@link Prism.highlightElement} for each element.
* 2. `before-all-elements-highlight`
* 3. All hooks of {@link Prism.highlightElement} for each element.
*
* @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
* @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
Expand Down Expand Up @@ -492,11 +493,14 @@ var _ = {
* The following hooks will be run:
* 1. `before-sanity-check`
* 2. `before-highlight`
* 3. All hooks of {@link Prism.highlight}. These hooks will only be run by the current worker if `async` is `true`.
* 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
* 4. `before-insert`
* 5. `after-highlight`
* 6. `complete`
*
* Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
* the element's language.
*
* @param {Element} element The element containing the code.
* It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
* @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
Expand Down

0 comments on commit 206dc80

Please sign in to comment.