mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-26 21:28:04 +00:00
Fix open html anchor link in markdown preview (#228633)
use node.getAttribute instead of node.href Co-authored-by: Gianluca Cappai <gcappai.dev@@gmail.com> Co-authored-by: Matt Bierner <matb@microsoft.com>
This commit is contained in:
@@ -332,11 +332,11 @@ document.addEventListener('click', event => {
|
||||
|
||||
let hrefText = node.getAttribute('data-href');
|
||||
if (!hrefText) {
|
||||
hrefText = node.getAttribute('href');
|
||||
// Pass through known schemes
|
||||
if (passThroughLinkSchemes.some(scheme => node.href.startsWith(scheme))) {
|
||||
if (passThroughLinkSchemes.some(scheme => hrefText.startsWith(scheme))) {
|
||||
return;
|
||||
}
|
||||
hrefText = node.getAttribute('href');
|
||||
}
|
||||
|
||||
// If original link doesn't look like a url, delegate back to VS Code to resolve
|
||||
|
||||
Reference in New Issue
Block a user