Fix #183: Don't add classes to code blocks

Previously, MkDocs will add classes to the <pre><code> blocks generated
from the md file to allow for the prettify library to work its magic.
This commit moves the translation into base.js under mkdocs, so now the
theme handles the prettify instead of assuming in the build process.
This allows users to use other libraries, such as highlight.js.
This commit is contained in:
Ng Zhi An
2014-11-02 18:17:11 -05:00
parent d66e7fa8dc
commit 3f456cedee
2 changed files with 1 additions and 2 deletions

View File

@@ -83,8 +83,6 @@ def post_process_html(html_content, nav=None):
img_sub = PathToURL('src="%s"', nav)
html_content = re.sub(r'src="([^"]*)"', img_sub, html_content)
html_content = html_content.replace('<pre>', '<pre class="prettyprint well">')
return html_content

View File

@@ -1,6 +1,7 @@
/* Prettyify */
$( document ).ready(function() {
$('pre code').parent().addClass('prettyprint well')
prettyPrint();
});