potential changes

This commit is contained in:
Christopher Jeffrey 2012-01-06 16:44:48 -06:00
parent 6387415fdf
commit 02a125ba0f

View File

@ -31,6 +31,10 @@ block.html = (function() {
.replace('closed', /<(\w+)[^\0]+?<\/\1>/.source)
.replace('closing', /<\w+[^>]*>/.source);
// Better regexes:
// .replace('closed', /<(\w+)\b[^\0]*?<\/\1>/.source)
// .replace('closing', /<\w+(?!:\/|@)\b[^>]*>/.source);
return new
RegExp(html);
})();
@ -168,8 +172,12 @@ block.token = function(str, tokens, top) {
tokens.push({
type: 'blockquote_start'
});
cap = cap[0].replace(/^ *>/gm, '');
// Better conformance:
// cap = cap[0].replace(/^ *> ?/gm, '');
// Pass `top` to keep the current
// "toplevel" state. This is exactly
// how markdown.pl works.