Skip to content

Commit 1d972f7

Browse files
fix: langs names
1 parent 009b24f commit 1d972f7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/kotlin/app/extractors/Heuristics.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ val Heuristics = mapOf<String, (List<String>) -> ExtractorInterface?>(
167167
"f" to { lines ->
168168
val buf = toBuf(lines)
169169
if (ForthRegex.matches(buf)) CommonExtractor("forth")
170-
else if (buf.contains("flowop")) CommonExtractor("filebench WML")
170+
else if (buf.contains("flowop")) CommonExtractor("filebench_wml")
171171
else if (FortranRegex.matches(buf)) CommonExtractor("fortran")
172172
else null
173173
},
@@ -260,7 +260,7 @@ val Heuristics = mapOf<String, (List<String>) -> ExtractorInterface?>(
260260
"inc" to { lines ->
261261
val buf = toBuf(lines)
262262
if (Regex("^<\\?(?:php)?").matches(buf)) PhpExtractor()
263-
else if (Regex("^\\s*#(declare|local|macro|while)\\s").matches(buf)) CommonExtractor("POV-Ray SDL")
263+
else if (Regex("^\\s*#(declare|local|macro|while)\\s").matches(buf)) CommonExtractor("pov-ray_sdl")
264264
else null
265265
},
266266
"inl" to { _ ->
@@ -337,7 +337,7 @@ val Heuristics = mapOf<String, (List<String>) -> ExtractorInterface?>(
337337
if (Regex("(^\\s*module)|let rec |match\\s+(\\S+\\s)+with").matches(buf))
338338
CommonExtractor("ocaml")
339339
else if (Regex("=> |case\\s+(\\S+\\s)+of").matches(buf))
340-
CommonExtractor("standard ML")
340+
CommonExtractor("standard_ml")
341341
else null
342342
},
343343
"mli" to { _ ->
@@ -397,7 +397,7 @@ val Heuristics = mapOf<String, (List<String>) -> ExtractorInterface?>(
397397
val buf = toBuf(lines)
398398
if (Perl5Regex.matches(buf)) CommonExtractor("perl")
399399
else if (Perl6Regex.matches(buf)) CommonExtractor("perl6")
400-
else if (Regex("^\\s*\\/\\* XPM \\*\\/").matches(buf)) CommonExtractor("XPM")
400+
else if (Regex("^\\s*\\/\\* XPM \\*\\/").matches(buf)) CommonExtractor("xpm")
401401
else null
402402
},
403403
"pom" to { _ ->
@@ -416,7 +416,7 @@ val Heuristics = mapOf<String, (List<String>) -> ExtractorInterface?>(
416416
},
417417
"props" to { lines ->
418418
val buf = toBuf(lines)
419-
if (XMLPropsRegex.matches(buf)) CommonExtractor("XML")
419+
if (XMLPropsRegex.matches(buf)) CommonExtractor("xml")
420420
else if (Regex("\\w+\\s*=\\s*", RegexOption.IGNORE_CASE).matches(buf)) CommonExtractor("ini")
421421
else null
422422
},
@@ -516,15 +516,15 @@ val Heuristics = mapOf<String, (List<String>) -> ExtractorInterface?>(
516516
CommonExtractor("tex")
517517
},
518518
"ts" to { lines ->
519-
if (Regex("<TS\\b").matches(toBuf(lines))) CommonExtractor("XML")
519+
if (Regex("<TS\\b").matches(toBuf(lines))) CommonExtractor("xml")
520520
else CommonExtractor("typescript")
521521
},
522522
"tsx" to { lines ->
523523
val buf = toBuf(lines)
524524
if (Regex("^\\s*(import.+(from\\s+|require\\()['\"]react|\\/\\/\\/\\s*<reference\\s)").matches(buf))
525525
CommonExtractor("typescript")
526526
else if (Regex("^\\s*<\\?xml\\s+version", RegexOption.IGNORE_CASE).matches(buf))
527-
CommonExtractor("XML")
527+
CommonExtractor("xml")
528528
else null
529529
},
530530
"v" to { _ ->

0 commit comments

Comments
 (0)