Skip to content

fix parsed JSDoc author tag - #80898

Merged
Matt Bierner (mjbvz) merged 2 commits into
microsoft:masterfrom
hypercubestart:fix-80790
Jan 6, 2020
Merged

Matt Bierner (mjbvz) merged 2 commits into
microsoft:masterfrom
hypercubestart:fix-80790

Conversation

@hypercubestart

Copy link
Copy Markdown
Contributor

addresses #80790

I believe this is the best method of rendering the hover JSDoc author tag email address correctly, but open to any suggestions.

Also, I am unsure whether this issue also pertains to

// url (gfm)
if (!this.inLink && (cap = this.rules.url.exec(src))) {
if (cap[2] === '@') {
text = escape(cap[0]);
href = 'mailto:' + text;
} else {
// do extended autolink path validation
do {
prevCapZero = cap[0];
cap[0] = this.rules._backpedal.exec(cap[0])[0];
} while (prevCapZero !== cap[0]);
text = escape(cap[0]);
if (cap[1] === 'www.') {
href = 'http://' + text;
} else {
href = text;
}
}
src = src.substring(cap[0].length);
out += this.renderer.link(href, null, text);
continue;
}
since both if statements handle mailto

@hypercubestart

Copy link
Copy Markdown
Contributor Author

Johannes Rieken (@jrieken) can you review my PR please? thanks!

@mjbvz

Copy link
Copy Markdown
Contributor

Thanks for looking into this issue. However this file is at a very low level in VS Code (and from the external marked library)

Instead, I think we should scope the fix to just the TypeScript extension. Here's the file where I believe this logic lives:

function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined {

@hypercubestart

Copy link
Copy Markdown
Contributor Author

Matt Bierner (@mjbvz) can you please re-review? Thanks!

@mjbvz Matt Bierner (mjbvz) added this to the January 2020 milestone Jan 6, 2020
@mjbvz

Copy link
Copy Markdown
Contributor

Thanks! Fix will be in the next insiders build and is scheduled to go out with VS Code 1.42

@mjbvz
Matt Bierner (mjbvz) merged commit 81fb34c into microsoft:master Jan 6, 2020
@hypercubestart
Andrew Liu (hypercubestart) deleted the fix-80790 branch January 7, 2020 03:53
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants