diff options
| author | Boris Kheyfets <kheyfboris@gmail.com> | 2020-12-05 19:48:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-05 17:48:57 +0100 |
| commit | 05762d94007dc7b3e329a66bfb886ec6737f3376 (patch) | |
| tree | 499ff00dc27d73d71b3468d10c0499df39f4b464 | |
| parent | 765f29b284f5723e2cfd8c31354580242f84ee8e (diff) | |
| download | pygments-git-05762d94007dc7b3e329a66bfb886ec6737f3376.tar.gz | |
Update jvm.py (#1587)
Added support for kotlin scripts.
| -rw-r--r-- | pygments/lexers/jvm.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py index 2736329d..1dab164f 100644 --- a/pygments/lexers/jvm.py +++ b/pygments/lexers/jvm.py @@ -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 @@ -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), |
