Skip to content

Commit

Permalink
Merge pull request ipython#4232 from minrk/no-lang-no-highlight
Browse files Browse the repository at this point in the history
no highlight if no language specified
  • Loading branch information
ellisonbg committed Sep 20, 2013
2 parents 3d35e7b + 8d4b5a5 commit bc01979
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IPython/html/static/notebook/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ function (marked) {
tables: true,
langPrefix: "language-",
highlight: function(code, lang) {
if (!lang) {
// no language, no highlight
return code;
}
var highlighted;
try {
highlighted = hljs.highlight(lang, code, false);
Expand Down

0 comments on commit bc01979

Please sign in to comment.