autolink
This commit is contained in:
parent
0b200e4ab3
commit
03cc80ad81
@ -178,11 +178,11 @@ lex.token = function lex(str, tokens, line) {
|
||||
|
||||
var inline = (function() {
|
||||
var inline = {
|
||||
tag: /^<[^\n>]+>/,
|
||||
tag: /^<[^\n:>]+>/,
|
||||
img: /^!\[([^\]]+)\]\(([^\s\)]+)\s*([^\)]*)\)/,
|
||||
link: /^\[([^\]]+)\]\(([^\)]+)\)/,
|
||||
reflink: /^\[([^\]]+)\]\[([^\]]+)\]/,
|
||||
autolink: /^<([^<>:\/ ]+:(?:\/\/)?[^>\n]+?)|([^<>\n]+?@[^<>\n]+?)>/,
|
||||
autolink: /^<([^\n>]+)>/,
|
||||
strong: /^__([\s\S]+?)__|^\*\*([\s\S]+?)\*\*/,
|
||||
em: /^_([^_]+)_|^\*([^*]+)\*/,
|
||||
escape: /^`([^`]+)`|^``([\s\S]+?)``/
|
||||
@ -191,7 +191,7 @@ var inline = (function() {
|
||||
inline.text = new RegExp(
|
||||
'^([\\s\\S]+?)(?='
|
||||
+ Object.keys(inline).map(function(key) {
|
||||
return inline[key].source.replace(/(^|\|)\^/g, '$1');
|
||||
return inline[key].source.replace(/(^|[^\[])\^/g, '$1');
|
||||
}).join('|')
|
||||
+ '|$)'
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user