mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-12-05 00:00:34 +00:00
fix: Fix metadata to show crystal
This commit is contained in:
parent
2fab6eaff0
commit
15b9a781a9
@ -38,6 +38,12 @@ for fname in glob.glob("lexers/*.xml"):
|
|||||||
lexer_by_filename[filename].add(lexer_name)
|
lexer_by_filename[filename].add(lexer_name)
|
||||||
|
|
||||||
with open("src/constants/lexers.cr", "w") as f:
|
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("module Tartrazine\n")
|
||||||
f.write(" LEXERS_BY_NAME = {\n")
|
f.write(" LEXERS_BY_NAME = {\n")
|
||||||
for k in sorted(lexer_by_name.keys()):
|
for k in sorted(lexer_by_name.keys()):
|
||||||
|
Loading…
Reference in New Issue
Block a user