Skip to content

Commit

Permalink
Update jvm.py (#1587)
Browse files Browse the repository at this point in the history
Added support for kotlin scripts.
  • Loading branch information
bk322 committed Dec 5, 2020
1 parent 765f29b commit 05762d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygments/lexers/jvm.py
Expand Up @@ -1027,7 +1027,7 @@ class KotlinLexer(RegexLexer):

name = 'Kotlin'
aliases = ['kotlin']
filenames = ['*.kt']
filenames = ['*.kt', '*.kts']
mimetypes = ['text/x-kotlin']

flags = re.MULTILINE | re.DOTALL | re.UNICODE
Expand All @@ -1049,6 +1049,7 @@ class KotlinLexer(RegexLexer):
(r'\s+', Text),
(r'\\\n', Text), # line continuation
(r'//.*?\n', Comment.Single),
(r'^#!/.+?\n', Comment.Single), # shebang for kotlin scripts
(r'/[*].*?[*]/', Comment.Multiline),
(r'""".*?"""', String),
(r'\n', Text),
Expand Down

0 comments on commit 05762d9

Please sign in to comment.