Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tooltip on links in markdown preview #30201 #40572

Conversation

bpceee
Copy link
Contributor

@bpceee bpceee commented Dec 20, 2017

fixes #30201

@@ -128,6 +128,10 @@
const text = data.contents.join('\n');
const newDocument = new DOMParser().parseFromString(text, 'text/html');

newDocument.querySelectorAll('a').forEach(a => {
a.title = a.href;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check to see if title has already been set here. Don't overwrite it if it has

@mjbvz mjbvz added this to the December 2017/January 2018 milestone Dec 21, 2017
@mjbvz mjbvz merged commit c961e6b into microsoft:master Dec 21, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 21, 2017

Thanks! Should be in the next insiders build

@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.

Markdown preview - show tooltip on links
2 participants