Skip to content

Commit bb59cc0

Browse files
authored
Merge pull request #62 from clonesht/main
Update js/ts/py language detection
2 parents 61b19c1 + 7b57054 commit bb59cc0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/detect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const languages = [
1414
['bash', [/#!(\/usr)?\/bin\/bash/g, 500], [/\b(if|elif|then|fi|echo)\b|\$/g, 10]],
1515
['html', [/<\/?[a-z-]+[^\n>]*>/g, 10], [/^\s+<!DOCTYPE\s+html/g, 500]],
1616
['http', [/^(GET|HEAD|POST|PUT|DELETE|PATCH|HTTP)\b/g, 500]],
17-
['js', [/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require)\b/g, 10]],
18-
['ts', [/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|implements|interface|namespace)\b/g, 10]],
19-
['py', [/\b(def|print|class|and|or|lambda)\b/g, 10]],
17+
['js', [/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window)\b/g, 10]],
18+
['ts', [/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window|implements|interface|namespace)\b/g, 10]],
19+
['py', [/\b(def|print|await|async|class|and|or|lambda|import|from|self|asyncio|pass|True|False|None|__init__)\b/g, 10]],
2020
['sql', [/\b(SELECT|INSERT|FROM)\b/g, 50]],
2121
['pl', [/#!(\/usr)?\/bin\/perl/g, 500], [/\b(use|print)\b|\$/g, 10]],
2222
['lua', [/#!(\/usr)?\/bin\/lua/g, 500]],

0 commit comments

Comments
 (0)