Skip to content

Commit

Permalink
call beautify functions in window context
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuzina committed Jul 29, 2024
1 parent 2231dd1 commit 24a5202
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/static/js/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
try {
switch (lang) {
case 'html':
return html_beautify(source, {indent_size: 2});
return window.html_beautify(source, {indent_size: 2});
case 'js':
return js_beautify(source, {indent_size: 2});
return window.js_beautify(source, {indent_size: 2});
case 'css':
return css_beautify(source, {indent_size: 2});
return window.css_beautify(source, {indent_size: 2});
default:
return source;
}
Expand Down

0 comments on commit 24a5202

Please sign in to comment.