Browse Source

fix build to add class to code blocks

Gregg Tavares 6 years ago
parent
commit
519e74d868
1 changed files with 3 additions and 0 deletions
  1. 3 0
      build/js/build.js

+ 3 - 0
build/js/build.js

@@ -400,6 +400,9 @@ const Builder = function(outBaseDir, options) {
     const info = extractHandlebars(content);
     let html = marked(info.content);
     // HACK! :-(
+    // There's probably a way to do this in marked
+    html = html.replace(/<pre><code/g, '<pre class="prettyprint"><code');
+    // HACK! :-(
     if (opt_extra && opt_extra.home && opt_extra.home.length > 1) {
       html = hackRelLinks(html, pageUrl);
     }