fix code blocks
This commit is contained in:
parent
ccfc53b4a3
commit
3c33c9daa1
@ -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, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
|
Loading…
x
Reference in New Issue
Block a user