diff options
author | bitsawer <sawerduster@gmail.com> | 2023-02-23 14:25:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 13:25:42 +0100 |
commit | ea05e21a0e74ae1c0a0da9bc50574530280bc3c2 (patch) | |
tree | cbe61bf348231cf2b8cc0b994ce3b7296f34360e /pygments | |
parent | 5704c619bd8cb252a9b5d61cb747ee592591ba4b (diff) | |
download | pygments-git-ea05e21a0e74ae1c0a0da9bc50574530280bc3c2.tar.gz |
Fix GLSL and HLSL preprocessor line continuation (#2350)
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/graphics.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/graphics.py b/pygments/lexers/graphics.py index 95e56d0c..146bb744 100644 --- a/pygments/lexers/graphics.py +++ b/pygments/lexers/graphics.py @@ -30,7 +30,7 @@ class GLShaderLexer(RegexLexer): tokens = { 'root': [ - (r'^#.*$', Comment.Preproc), + (r'^#(?:.*\\\n)*.*$', Comment.Preproc), (r'//.*$', Comment.Single), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?', @@ -161,7 +161,7 @@ class HLSLShaderLexer(RegexLexer): tokens = { 'root': [ - (r'^#.*$', Comment.Preproc), + (r'^#(?:.*\\\n)*.*$', Comment.Preproc), (r'//.*$', Comment.Single), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?', |