diff options
author | K. Lux <k.lux@posteo.de> | 2020-11-19 00:12:55 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2020-11-19 07:57:08 +0100 |
commit | 0744d686e33279c6ec05fb7f71c0b11d342abb50 (patch) | |
tree | acb385dd9f024fb9f202adb8e1d17d158d1c5669 /pygments/lexers/javascript.py | |
parent | 1d8f74c83dce4eb20d81eff1b1baa3594091f964 (diff) | |
download | pygments-git-0744d686e33279c6ec05fb7f71c0b11d342abb50.tar.gz |
Rust lexer: bug fix with regex lexer and '!' + r'\b'
Rust macros end with a '!'. The word border (regex '\b') for such expressions is located before the '!' (e. g. "print\b!(...)"). The regex here used the suffix option, which added an r'\b' after each regex (e. g. r'print!\b'). Therefore, the supplied regular expressions didn't match the rust macros.
To fix this problem, the suffix is removed. As every macro ends with an '!' (which implicitely includes a word border before), it's not necessary anyway.
Diffstat (limited to 'pygments/lexers/javascript.py')
0 files changed, 0 insertions, 0 deletions