Skip to content

Commit

Permalink
Fixed alias example in extending page (#2011)
Browse files Browse the repository at this point in the history
This fixes the example on how to add a language alias to a language definition.
  • Loading branch information
jakubklimek authored and RunDevelopment committed Aug 5, 2019
1 parent 3af5d74 commit 7cb65ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extending.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ <h1>Creating a new language definition</h1>

<p>To add the alias, we add this line at the end of <code>prism-foo-bar.js</code>:</p>

<pre><code class="language-js">Prism.languages.foo = Prism.language['foo-bar'];</code></pre>
<pre><code class="language-js">Prism.languages.foo = Prism.languages['foo-bar'];</code></pre>

<p>Aliases also have to be registered in <code>components.json</code> by adding the <code>alias</code> property to the language entry. In this example, the updated entry will look like this:</p>

Expand Down

0 comments on commit 7cb65ee

Please sign in to comment.