const SAMPLES: &[(&str, &str)] = &[
("md", "# Sample\n"),
("markdown", "# Sample\n"),
("mdx", "# Sample\n"),
("json", "{ \"a\": 1 }\n"),
("jsonc", "{ \"a\": 1 }\n"),
("json5", "{ a: 1 }\n"),
("yaml", "a: 1\n"),
("yml", "a: 1\n"),
("toml", "a = 1\n"),
("js", "const a = 1;\n"),
("jsx", "const a = 1;\n"),
("mjs", "const a = 1;\n"),
("cjs", "const a = 1;\n"),
("ts", "const a = 1;\n"),
("tsx", "const a = 1;\n"),
("mts", "const a = 1;\n"),
("cts", "const a = 1;\n"),
("css", "a {\n color: red;\n}\n"),
("scss", "a {\n color: red;\n}\n"),
("less", "a {\n color: red;\n}\n"),
("html", "<p>a</p>\n"),
("htm", "<p>a</p>\n"),
("vue", "<template><p>a</p></template>\n"),
("graphql", "type A {\n a: Int\n}\n"),
("gql", "type A {\n a: Int\n}\n"),
("hbs", "<p>{{a}}</p>"),
("handlebars", "<p>{{a}}</p>"),
];
pub fn sample(ext: &str) -> Option<&'static str> {
SAMPLES.iter().find(|(e, _)| *e == ext).map(|(_, t)| *t)
}
#[cfg(test)]
pub fn extensions() -> impl Iterator<Item = &'static str> {
SAMPLES.iter().map(|(e, _)| *e)
}