Skip to content

Commit 38ac08e

Browse files
committed
Prettify docs say to put class on the <pre>
Any/all Prettier syntax themes expect pre.prettyprint
1 parent 114e4c9 commit 38ac08e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prettify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function(){
66
for(var i = 0; i < codes.length; i ++){
77
var code = codes[i];
88
if(code.parentNode.nodeName.toUpperCase() === "PRE"){
9-
code.className = code.className +" prettyprint";
9+
code.parentNode.className = code.parentNode.className + " prettyprint";
1010
}
1111
}
1212
//turn off batching (https://github.com/google/code-prettify/blob/master/src/prettify.js#L142)

0 commit comments

Comments
 (0)