summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <Anteru@users.noreply.github.com>2023-03-25 14:12:37 +0100
committerGitHub <noreply@github.com>2023-03-25 14:12:37 +0100
commitdb66015fb9875ea66a30046e00b463e410d4cd53 (patch)
tree02015ea1cc1bcba5aa54ceefc9660dc8ab998324 /tests
parentc4ea8a14b735c3c909d461271600bf83779f7f18 (diff)
parent30809916f2ae5462be7b64f0387203030cb40537 (diff)
downloadpygments-git-db66015fb9875ea66a30046e00b463e410d4cd53.tar.gz
Merge pull request #2383 from pygments/2382-fix
css: fix lexing numbers inside function calls
Diffstat (limited to 'tests')
-rw-r--r--tests/snippets/css/percent_in_func.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/snippets/css/percent_in_func.txt b/tests/snippets/css/percent_in_func.txt
new file mode 100644
index 00000000..9fce9bde
--- /dev/null
+++ b/tests/snippets/css/percent_in_func.txt
@@ -0,0 +1,51 @@
+---input---
+.target-img {
+ position: absolute;
+ top: 25%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
+---tokens---
+'.' Punctuation
+'target-img' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'position' Keyword
+':' Punctuation
+' ' Text.Whitespace
+'absolute' Keyword.Constant
+';' Punctuation
+' \n ' Text.Whitespace
+'top' Keyword
+':' Punctuation
+' ' Text.Whitespace
+'25' Literal.Number.Integer
+'%' Keyword.Type
+';' Punctuation
+' \n ' Text.Whitespace
+'left' Keyword
+':' Punctuation
+' ' Text.Whitespace
+'50' Literal.Number.Integer
+'%' Keyword.Type
+';' Punctuation
+' \n ' Text.Whitespace
+'transform' Keyword
+':' Punctuation
+' ' Text.Whitespace
+'translate' Name.Builtin
+'(' Punctuation
+'-50' Literal.Number.Integer
+'%' Keyword.Type
+',' Punctuation
+' ' Text.Whitespace
+'-50' Literal.Number.Integer
+'%' Keyword.Type
+')' Punctuation
+';' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+' \n' Text.Whitespace