fix: fix gfm urls after link (#2186)

This commit is contained in:
Tony Brix 2021-08-23 13:47:32 -05:00 committed by GitHub
parent 73c39cab25
commit e03b5c1f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -13,7 +13,7 @@ function outputLink(cap, link, raw, lexer) {
if (cap[0].charAt(0) !== '!') { if (cap[0].charAt(0) !== '!') {
lexer.state.inLink = true; lexer.state.inLink = true;
return { const token = {
type: 'link', type: 'link',
raw, raw,
href, href,
@ -21,6 +21,8 @@ function outputLink(cap, link, raw, lexer) {
text, text,
tokens: lexer.inlineTokens(text, []) tokens: lexer.inlineTokens(text, [])
}; };
lexer.state.inLink = false;
return token;
} else { } else {
return { return {
type: 'image', type: 'image',

View File

@ -0,0 +1,3 @@
<p><a href="https://github.com">Github</a></p>
<p><a href="https://github.com">https://github.com</a></p>

View File

@ -0,0 +1,6 @@
---
gfm: true
---
[Github](https://github.com)
https://github.com