Skip to content

Commit

Permalink
fix: highlight js for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Rogan committed Oct 19, 2020
1 parent 7d3ab6b commit 928c49a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/www/_partials/component-example/_component-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export { displayShowMore };

export default () => {
const { hljs } = window; // declare higlightJS as global var
document.querySelectorAll('pre code').forEach(element => {
[].forEach.call(document.querySelectorAll('pre code'), element => {
// Run highlightJS for each pre code element found */
hljs.highlightBlock(element);
displayShowMore(element);
});
document.querySelectorAll('.wmnds-js-show-code').forEach(ele => {
[].forEach.call(document.querySelectorAll('.wmnds-js-show-code'), ele => {
showCode(ele); // run show code function above when hljs has init
});
};

0 comments on commit 928c49a

Please sign in to comment.