function strip_lang_tags(content) {
	return content
		.replace(
			/(<!--[^]*?-->)|(<script[^>]*?)\s(?:type|lang)=(["'])(.*?)\3/g,
			// Things like application/ld+json should be kept as-is. Preprocessed languages are "ts" etc.
			// Svelte 5 deals with TypeScript natively, and in the template, too, therefore keep it in.
			// Not removing it would mean Svelte parses without its TS plugin and then runs into errors.
			(match, comment, tag_open, _, type) =>
				type?.startsWith('application/') || (is_svelte_5_plus && type === 'ts')
					? match
					: (comment ?? '') + (tag_open ?? '')
		)
		.replace(/(<!--[^]*?-->)|(<style[^>]*?)\s(?:type|lang)=(["']).*?\3/g, '$1$2');
}
Strip out lang="X" or type="text/X" tags. Doing it here is only a temporary solution.
See https://github.com/sveltejs/kit/issues/2450 for ideas for places where it's handled better.

@param {string} content