Commits

Georg Brandl committed 3d4cbd1

Allow shebang line in Lua lexer.

Comments (0)

Files changed (2)

 - 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.
 

pygments/lexers/agile.py

 
     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),