Skip to content

Commit 2881c97

Browse files
Update 2-ui/99-ui-misc/01-mutation-observer/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
1 parent d929841 commit 2881c97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2-ui/99-ui-misc/01-mutation-observer/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Such snippet in an HTML markup looks like this:
130130

131131
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.
132132

133-
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:
133+
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:
134134

135135
```js
136136
// highlight all code snippets on the page

0 commit comments

Comments
 (0)