Skip to content

Commit

Permalink
fix rSyntax highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
shun2wang committed Jul 29, 2024
1 parent a5d0804 commit c2b7984
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Desktop/html/js/jaspwidgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ JASPWidgets.RSyntaxView = JASPWidgets.View.extend({
.html("<pre><code class='language-r'>" + rScript + "</code></pre>");
setTimeout(() => {
this.$el.find(".jasp-rsyntax")[0].querySelectorAll('pre code').forEach((el) => {
el.innerHTML = el.textContent; //Suppress warnings of html code tags
hljs.highlightElement(el);
el.innerHTML = hljs.highlight(el.textContent, { language: 'r' }).value;
});
}, 200);
},
Expand Down

0 comments on commit c2b7984

Please sign in to comment.