mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-12-04 15:50:35 +00:00
fix: Fix metadata to show crystal
This commit is contained in:
parent
0423811c5d
commit
96fd9bdfe9
@ -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