diff --git a/PlumedToHTML/PlumedLexer.py b/PlumedToHTML/PlumedLexer.py index c5f1560..d655514 100644 --- a/PlumedToHTML/PlumedLexer.py +++ b/PlumedToHTML/PlumedLexer.py @@ -26,8 +26,10 @@ class PlumedLexer(RegexLexer): (r'(\w+)(=)(@\S+:)((?s)\{.*?\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)), # Find special replica syntax without brackets (r'(\w+)(=)(@\S+:)(\S+\b)', bygroups(Name.Attribute, Text, Name.Constant, Generic)), - # Find KEYWORD with brackets around value + # Find KEYWORD with {} brackets around value (r'(\w+)(=)((?s)\{.*?\})', bygroups(Name.Attribute, Text, Generic)), + # Find KEYWORD with () brackets around value + (r'(\w+)(=)((?s)\(.*?\))', bygroups(Name.Attribute, Text, Generic)), # Find KEYWORD=whatever (r'(\w+)(=)(\S+\b)', bygroups(Name.Attribute, Text, Generic)) ], diff --git a/setup.py b/setup.py index 5dd1123..abab29c 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name='PlumedToHTML', - version='0.71', + version='0.72', author="Gareth Tribello", author_email="gareth.tribello@gmail.com", description="A package for creating pretified HTML for PLUMED files", diff --git a/tdata/lexertests.json b/tdata/lexertests.json index 5e434ad..50b1de3 100644 --- a/tdata/lexertests.json +++ b/tdata/lexertests.json @@ -79,6 +79,10 @@ { "input": "# This is a comment \n phi: TORSION ATOMS=1,2,3,4 # This is also a comment with : a colon", "output": "
# This is a comment \n phi: TORSION ATOMS=1,2,3,4 # This is also a comment with : a colon\n
\n" + }, + { + "input": "st_saxs: STATS ARG=(SAXS\\.q-.*) PARARG=(SAXS\\.exp-.*)", + "output": "
st_saxs: STATS ARG=(SAXS\\.q-.*) PARARG=(SAXS\\.exp-.*)\n
\n" } ] }