From 15b9a781a95d4795ea9379671027fd234db2c8d8 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Mon, 23 Sep 2024 17:53:13 -0300 Subject: [PATCH] fix: Fix metadata to show crystal --- scripts/lexer_metadata.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/lexer_metadata.py b/scripts/lexer_metadata.py index ea68663..ff019e9 100644 --- a/scripts/lexer_metadata.py +++ b/scripts/lexer_metadata.py @@ -38,6 +38,12 @@ for fname in glob.glob("lexers/*.xml"): lexer_by_filename[filename].add(lexer_name) with open("src/constants/lexers.cr", "w") as f: + # Crystal doesn't come from a xml file + lexer_by_name["crystal"] = "crystal" + lexer_by_name["cr"] = "crystal" + lexer_by_filename["*.cr"] = ["crystal"] + lexer_by_mimetype["text/x-crystal"] = "crystal" + f.write("module Tartrazine\n") f.write(" LEXERS_BY_NAME = {\n") for k in sorted(lexer_by_name.keys()):