summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--pygments/lexers/agile.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 14a62a66..1d034fc6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -36,7 +36,7 @@ Version 1.3
- Add small enhancements to the C lexer (#467) and Bash lexer (#469).
- Small fixes for the Tcl, Debian control file, Nginx config,
- Smalltalk, Objective-C, Clojure lexers.
+ Smalltalk, Objective-C, Clojure, Lua lexers.
- Gherkin lexer: Fixed single apostrophe bug and added new i18n keywords.
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index ea605404..bfaf0a68 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -1011,6 +1011,11 @@ class LuaLexer(RegexLexer):
tokens = {
'root': [
+ # lua allows a file to start with a shebang
+ (r'#!(.*?)$', Comment.Preproc),
+ (r'', Text, 'base'),
+ ],
+ 'base': [
(r'(?s)--\[(=*)\[.*?\]\1\]', Comment.Multiline),
('--.*$', Comment.Single),