fix code blocks
This commit is contained in:
parent
ccfc53b4a3
commit
3c33c9daa1
@ -107,7 +107,7 @@ var lex = function(str, tokens) {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'block':
|
case 'block':
|
||||||
cap = cap[0].replace(/^ +/gm, '');
|
cap = cap[0].replace(/^ {4}/gm, '');
|
||||||
tokens.push({
|
tokens.push({
|
||||||
type: 'block',
|
type: 'block',
|
||||||
text: cap,
|
text: cap,
|
||||||
@ -337,16 +337,16 @@ var parse = function(src) {
|
|||||||
links = null;
|
links = null;
|
||||||
line = null;
|
line = null;
|
||||||
|
|
||||||
return out.join('\n');
|
return out.join(' ');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helpers
|
* Helpers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var escape = function(html, d) {
|
var escape = function(html) {
|
||||||
return html
|
return html
|
||||||
.replace(d ? /&(?![^;\n]+;)/ : /&/g, '&')
|
.replace(/&/g, '&')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
.replace(/"/g, '"')
|
.replace(/"/g, '"')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user