}
`;
	// Replace line breaks with \n
	let subtitles = srtData.replace(/\r\n|\r|\n/g, "\n");
	// commas -> dots in timestamps
	subtitles = subtitles.replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, "$1.$2");
	// map SRT font colors to VTT cue span classes
	var colorMap = {};

	// font tags -> ::cue span tags
	subtitles = subtitles.replace(
	/<font color="([^"]+)">([\s\S]*?)<\/font>/g,
	function (_match, color, text) {
		let key =
		"c_" + color.replace(/^rgb/, "").replace(/\W/g, "").toLowerCase();
		colorMap[key] = col