fix code blocks

This commit is contained in:
Christopher Jeffrey 2011-07-25 15:37:42 -05:00
parent ccfc53b4a3
commit 3c33c9daa1

View File

@ -107,7 +107,7 @@ var lex = function(str, tokens) {
});
break;
case 'block':
cap = cap[0].replace(/^ +/gm, '');
cap = cap[0].replace(/^ {4}/gm, '');
tokens.push({
type: 'block',
text: cap,
@ -337,16 +337,16 @@ var parse = function(src) {
links = null;
line = null;
return out.join('\n');
return out.join(' ');
};
/**
* Helpers
*/
var escape = function(html, d) {
var escape = function(html) {
return html
.replace(d ? /&(?![^;\n]+;)/ : /&/g, '&')
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')