|
@ -32,11 +32,15 @@ module.exports = function autolink(state, silent) { |
|
|
if (!silent) { |
|
|
if (!silent) { |
|
|
token = state.push('link_open', 'a', 1); |
|
|
token = state.push('link_open', 'a', 1); |
|
|
token.attrs = [ [ 'href', fullUrl ] ]; |
|
|
token.attrs = [ [ 'href', fullUrl ] ]; |
|
|
|
|
|
token.markup = 'autolink'; |
|
|
|
|
|
token.info = 'auto'; |
|
|
|
|
|
|
|
|
token = state.push('text', '', 0); |
|
|
token = state.push('text', '', 0); |
|
|
token.content = state.md.normalizeLinkText(url); |
|
|
token.content = state.md.normalizeLinkText(url); |
|
|
|
|
|
|
|
|
token = state.push('link_close', 'a', -1); |
|
|
token = state.push('link_close', 'a', -1); |
|
|
|
|
|
token.markup = 'autolink'; |
|
|
|
|
|
token.info = 'auto'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
state.pos += linkMatch[0].length; |
|
|
state.pos += linkMatch[0].length; |
|
|