@@ -17,19 +17,19 @@ class PlumedLexer(RegexLexer):
1717 (r'(\w+)(=)(__FILL__)' , bygroups (Name .Attribute , Text , Literal )),
1818 (r'__FILL__' , Literal ),
1919 # Find LABEL=lab
20- (r'((?i)LABEL )(=)(\S+\b)' , bygroups (Name .Attribute , Text , String .Double )),
20+ (r'([Ll][Aa][Bb][Ee][Ll] )(=)(\S+\b)' , bygroups (Name .Attribute , Text , String .Double )),
2121 # Find special replica syntax with fill
2222 (r'(\w+)(=)(@\S+:)(__FILL__)' , bygroups (Name .Attribute , Text , Name .Constant , Literal )),
2323 # Find special replica syntax with brackets around replica command
24- (r'(\w+)(=\{)(@\S+:)((?s) \{.*?\})(\})' , bygroups (Name .Attribute , Text , Name .Constant , Generic , Text )),
24+ (r'(?s)( \w+)(=\{)(@\S+:)(\{.*?\})(\})' , bygroups (Name .Attribute , Text , Name .Constant , Generic , Text )),
2525 # Find special repliica syntax with multiple brackets
26- (r'(\w+)(=)(@\S+:)((?s) \{\s*\{.*?\}\s*\})' , bygroups (Name .Attribute , Text , Name .Constant , Generic )),
26+ (r'(?s)( \w+)(=)(@\S+:)(\{\s*\{.*?\}\s*\})' , bygroups (Name .Attribute , Text , Name .Constant , Generic )),
2727 # Find special replica syntax with brackets
28- (r'(\w+)(=)(@\S+:)((?s) \{.*?\})' , bygroups (Name .Attribute , Text , Name .Constant , Generic )),
28+ (r'(?s)( \w+)(=)(@\S+:)(\{.*?\})' , bygroups (Name .Attribute , Text , Name .Constant , Generic )),
2929 # Find special replica syntax without brackets
3030 (r'(\w+)(=)(@\S+:)(\S+\b)' , bygroups (Name .Attribute , Text , Name .Constant , Generic )),
3131 # Find KEYWORD with {} brackets around value
32- (r'(\w+)(=)((?s) \{.*?\})' , bygroups (Name .Attribute , Text , Generic )),
32+ (r'(?s)( \w+)(=)(\{.*?\})' , bygroups (Name .Attribute , Text , Generic )),
3333 # Find KEYWORD=whatever with comment immediately after end of whatever
3434 (r'(\w+)(=)(\S+)(#.*$)' , bygroups (Name .Attribute , Text , Generic , Comment )),
3535 # Find KEYWORD=whatever
@@ -43,7 +43,7 @@ class PlumedLexer(RegexLexer):
4343 # And stuff for long versions of shortcuts
4444 (r'(^# PLUMED interprets the command:\n)(#.+$)' , bygroups (Comment , Comment .Hashbang )),
4545 # Find ENDPLUMED and set everything after it to a comment
46- (r'(^\s*ENDPLUMED)((?s) .*\Z)' , bygroups (Keyword , Comment )),
46+ (r'(?s)( ^\s*)([Ee][Nn][Dd][Pp][Ll][Uu][Mm][Ee][Dd])( .*\Z)' , bygroups (Text , Keyword , Comment )),
4747 # Find the start of shortcuts
4848 (r'#SHORTCUT.*?\r?\n' ,Comment .Preproc ),
4949 # Find the start of a shortcut with a nested default
0 commit comments