summaryrefslogtreecommitdiff
path: root/pygments/lexers/robotframework.py
diff options
context:
space:
mode:
authorLeistungsabfall <Leistungsabfall@users.noreply.github.com>2021-10-24 18:35:47 +0200
committerGitHub <noreply@github.com>2021-10-24 18:35:47 +0200
commit616c36733c0804d2f7a611cbb744619573da1210 (patch)
tree01e273eca15b218d34fc5703470a33429cd17c1a /pygments/lexers/robotframework.py
parent907df2c247ed56d4c4562249fbdee482217fce34 (diff)
downloadpygments-git-616c36733c0804d2f7a611cbb744619573da1210.tar.gz
robotframework: fix empty braces being thrown away after list or dict… (#1921)
* robotframework: fix empty braces being thrown away after list or dict variable * robotframework: add test cases to ensure correct behaviour
Diffstat (limited to 'pygments/lexers/robotframework.py')
-rw-r--r--pygments/lexers/robotframework.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py
index 305cc26f..3c212f5e 100644
--- a/pygments/lexers/robotframework.py
+++ b/pygments/lexers/robotframework.py
@@ -99,7 +99,7 @@ class VariableTokenizer:
yield var.identifier + '{', SYNTAX
yield from self.tokenize(var.base, VARIABLE)
yield '}', SYNTAX
- if var.index:
+ if var.index is not None:
yield '[', SYNTAX
yield from self.tokenize(var.index, VARIABLE)
yield ']', SYNTAX