dirty Fix for github code block

This commit is contained in:
zhangyijun 2013-02-14 12:59:04 +08:00
parent 2e102c72b2
commit d5d379a145

View File

@ -10,9 +10,9 @@
return [ return [
{ type: 'output', filter: function(source){ { type: 'output', filter: function(source){
return source.replace(/(<pre>)?<code>/gi, function(match, pre) { return source.replace(/(<pre(.)*>)?<code/gi, function(match, pre) {
if (pre) { if (pre) {
return '<pre class="prettyprint linenums" tabIndex="0"><code data-inner="1">'; return '<pre class="prettyprint linenums" tabIndex="0"><code data-inner="1"';
} else { } else {
return '<code class="prettyprint">'; return '<code class="prettyprint">';
} }