better lexer guessing

This commit is contained in:
Will McGugan
2025-10-08 17:55:19 +01:00
parent de663435a4
commit d497bc711a
3 changed files with 22 additions and 10 deletions

View File

@@ -19,9 +19,13 @@ def test_highlight() -> None:
@pytest.mark.parametrize(
"code,path,language",
[
("", "", "default"),
("# Don't matter", "foo.tcss", "scss"),
("import this", "foo.py", "python"),
("<xml>", "foo.xml", "xml"),
("{}", "data.json", "json"),
("#! python", "", "python"),
("", "foo.py", "python"),
],
)
def test_guess_language(code: str, path: str, language: str) -> None: