add potential strong/em behavior, dont check cap[1] in code rule
This commit is contained in:
parent
91bb13c714
commit
3175953d0c
@ -306,10 +306,15 @@ var inline = {
|
||||
strong: /^__([^\0]+?)__(?!_)|^\*\*([^\0]+?)\*\*(?!\*)/,
|
||||
em: /^\b_([^\0]+?)_\b|^\*((?:\*\*|[^\0])+?)\*(?!\*)/,
|
||||
|
||||
// markdown.pl em/strong behavior
|
||||
// upskirt/markdown.pl em/strong behavior
|
||||
// strong: /^__(?=\S)([^\0]*?\S)__(?!_)|^\*\*(?=\S)([^\0]*?\S)\*\*(?!\*)/,
|
||||
// em: /^\b_(?=\S)([^\0]*?\S)_\b|^\*(?=\S)([^\0]*?\S)\*(?!\*)/,
|
||||
|
||||
// strict em/strong behavior
|
||||
// closest to being conformant without markdown.pl's bugs
|
||||
// strong: /^__(?=\S)([^\0]*?\S)__(?!_)|^\*\*(?=\S)([^\0]*?\S)\*\*(?!\*)/,
|
||||
// em: /^\b_(?=\S)([^\0]*?\S)_\b|^\*(?=\S)([^\0]*?(?:\*\*|[^\s*]))\*(?!\*)/,
|
||||
|
||||
code: /^(`+)([^\0]*?[^`])\1(?!`)/,
|
||||
br: /^ {2,}\n(?!\s*$)/,
|
||||
text: /^[^\0]+?(?=body|$)/
|
||||
@ -451,7 +456,7 @@ inline.lexer = function(str) {
|
||||
if (cap = inline.code.exec(str)) {
|
||||
str = str.substring(cap[0].length);
|
||||
out += '<code>'
|
||||
+ escape(cap[2] || cap[1], true)
|
||||
+ escape(cap[2], true)
|
||||
+ '</code>';
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user