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

Fix extension preview codeblock language getter #235880

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

RedCMD
Copy link
Contributor

@RedCMD RedCMD commented Dec 12, 2024

fix #234463

no need to strip and ruin the lang id

function getLang(lang: string) {
	return (lang || '').match(/\S*/)![0];
}

when we already account for it in a better way later on

const languageId = languageService.getLanguageIdByLanguageName(lang) ?? languageService.getLanguageIdByLanguageName(lang.split(/\s+|:|,|(?!^)\{|\?]/, 1)[0]);

Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Looks like it got introduced when I pulled in this code as part of the marked update

@mjbvz mjbvz added this to the January 2025 milestone Dec 12, 2024
@mjbvz mjbvz enabled auto-merge December 12, 2024 07:06
@mjbvz mjbvz closed this Dec 17, 2024
auto-merge was automatically disabled December 17, 2024 18:02

Pull request was closed

@mjbvz mjbvz reopened this Dec 17, 2024
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 17, 2024

Sorry for the noise here. Our Ci checks are having some issues and I'm trying to unblock them

@mjbvz mjbvz enabled auto-merge December 17, 2024 18:03
@mjbvz mjbvz merged commit fbc4b86 into microsoft:main Dec 17, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[regression] Wrong language in extension readme markdown codeblock
5 participants