Fix CppReference lookup functionality (#8207)

This commit is contained in:
DipakHalkude
2025-10-22 14:08:05 +05:30
committed by GitHub
parent 3c5a117ab7
commit ddfe65620f

View File

@@ -1065,7 +1065,9 @@ export class Editor extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Edit
if (cpprefLangs.includes(preferredLanguage)) {
langTag = preferredLanguage;
}
const url = 'https://' + langTag + '.cppreference.com/mwiki/index.php?search=' + encodeURIComponent(word.word);
const url =
'https://www.google.com/search?q=' +
encodeURIComponent(word.word + ' site:' + langTag + '.cppreference.com');
window.open(url, '_blank', 'noopener');
}