From 7cb65eeca5b109c868a88a3b9843382fd9acd481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kl=C3=ADmek?= Date: Mon, 5 Aug 2019 13:16:32 +0200 Subject: [PATCH] Fixed alias example in extending page (#2011) This fixes the example on how to add a language alias to a language definition. --- extending.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extending.html b/extending.html index dfc3f1a329..ed0d2f1c0b 100644 --- a/extending.html +++ b/extending.html @@ -177,7 +177,7 @@

Creating a new language definition

To add the alias, we add this line at the end of prism-foo-bar.js:

-
Prism.languages.foo = Prism.language['foo-bar'];
+
Prism.languages.foo = Prism.languages['foo-bar'];

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