From 2881c97d727705902b2a31b45252e2ef36b24112 Mon Sep 17 00:00:00 2001 From: Peter Kampjes <67612358+peachesontour@users.noreply.github.com> Date: Tue, 1 Sep 2020 08:56:29 -0300 Subject: [PATCH] Update 2-ui/99-ui-misc/01-mutation-observer/article.md Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com> --- 2-ui/99-ui-misc/01-mutation-observer/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/99-ui-misc/01-mutation-observer/article.md b/2-ui/99-ui-misc/01-mutation-observer/article.md index 8b780cce..1c7f2c4a 100644 --- a/2-ui/99-ui-misc/01-mutation-observer/article.md +++ b/2-ui/99-ui-misc/01-mutation-observer/article.md @@ -130,7 +130,7 @@ Such snippet in an HTML markup looks like this: For better readability and at the same time, to beautify it, we'll be using a JavaScript syntax highlighting library on our site, like [Prism.js](https://prismjs.com/). To get syntax highlighting for above snippet in Prism, `Prism.highlightElem(pre)` is called, which examines the contents of such `pre` elements and adds special tags and styles for colored syntax highlighting into those elements, similar to what you see in examples here, on this page. -When exactly should we run that highlighting method? We can do it on `DOMContentLoaded` event, or at the bottom of the page. At that moment we have our DOM ready, we can search for elements `pre[class*="language"]` and call `Prism.highlightElem` on them: +When exactly should we run that highlighting method? Well, we can do it on `DOMContentLoaded` event, or put the script at the bottom of the page. The moment our DOM is ready, we can search for elements `pre[class*="language"]` and call `Prism.highlightElem` on them: ```js // highlight all code snippets on the page