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