summaryrefslogtreecommitdiff
path: root/pygments/lexers/javascript.py
diff options
context:
space:
mode:
authorJean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>2021-07-06 23:08:50 +0200
committerGitHub <noreply@github.com>2021-07-06 23:08:50 +0200
commitfa7772ca6c2eb5923c7c6424b4197f2379ae471c (patch)
tree558c6bf521d308b7cbc2855a8b2afae3b0c60c6a /pygments/lexers/javascript.py
parent2cb532d83dbcd022af413a299679e3018af8b98a (diff)
downloadpygments-git-fa7772ca6c2eb5923c7c6424b4197f2379ae471c.tar.gz
Fix FutureWarning for words() with "[" (#1854)
regex_opt() groups characters in sets when possible. The warning was caused when the "[" character ended up at the beginning of a set: r"[[...]". This emits a FutureWarning since Python 3.7 due to possible changes in semantics in the future (https://bugs.python.org/issue30349). Just add "[" to the list of characters that should be escaped in sets. Add unit tests for words(). [Closes #1853.]
Diffstat (limited to 'pygments/lexers/javascript.py')
0 files changed, 0 insertions, 0 deletions