Skip to content

Commit 4c4b86b

Browse files
committed
Take into account exec and lang
1 parent 717df03 commit 4c4b86b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/marked.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,12 @@ Renderer.prototype.code = function(code, lang, escaped, attr) {
844844
}
845845
}
846846

847+
var cls = this.options.langPrefix + escape(lang, true)
848+
if(attr) {
849+
cls += ' ' + attr;
850+
}
847851
return '<pre><code class="'
848-
+ this.options.langPrefix
849-
+ escape(lang, true)
852+
+ cls
850853
+ '">'
851854
+ (escaped ? code : escape(code, true))
852855
+ '\n</code></pre>\n';

0 commit comments

Comments
 (0)