diff --git a/doc/utils/sphinx-config/LAMMPSLexer.py b/doc/utils/sphinx-config/LAMMPSLexer.py index a7ba5d92a8..ee548dc602 100644 --- a/doc/utils/sphinx-config/LAMMPSLexer.py +++ b/doc/utils/sphinx-config/LAMMPSLexer.py @@ -76,12 +76,12 @@ class LAMMPSLexer(RegexLexer): include('conditionals'), include('keywords'), (r'#.*?\n', Comment), - ('"', String, 'string'), - ('\'', String, 'single_quote_string'), + (r'"', String, 'string'), + (r'\'', String, 'single_quote_string'), (r'[0-9]+:[0-9]+(:[0-9]+)?', Number), (r'[0-9]+(\.[0-9]+)?([eE]\-?[0-9]+)?', Number), - ('\$?\(', Name.Variable, 'expression'), - ('\$\{', Name.Variable, 'variable'), + (r'\$?\(', Name.Variable, 'expression'), + (r'\$\{', Name.Variable, 'variable'), (r'[\w_\.\[\]]+', Name), (r'\$[\w_]+', Name.Variable), (r'\s+', Whitespace), @@ -97,21 +97,21 @@ class LAMMPSLexer(RegexLexer): ] , 'variable' : [ - ('[^\}]+', Name.Variable), - ('\}', Name.Variable, '#pop'), + (r'[^\}]+', Name.Variable), + (r'\}', Name.Variable, '#pop'), ], 'string' : [ - ('[^"]+', String), - ('"', String, '#pop'), + (r'[^"]+', String), + (r'"', String, '#pop'), ], 'single_quote_string' : [ - ('[^\']+', String), - ('\'', String, '#pop'), + (r'[^\']+', String), + (r'\'', String, '#pop'), ], 'expression' : [ - ('[^\(\)]+', Name.Variable), - ('\(', Name.Variable, 'expression'), - ('\)', Name.Variable, '#pop'), + (r'[^\(\)]+', Name.Variable), + (r'\(', Name.Variable, 'expression'), + (r'\)', Name.Variable, '#pop'), ], 'modify_cmd' : [ (r'[\w_\-\.\[\]]+', Name.Variable.Identifier),