From 0205e2fb69326fc0f7bcef02ea555abaad92a190 Mon Sep 17 00:00:00 2001 From: Piotr Semenov Date: Thu, 16 May 2024 02:20:38 +0400 Subject: [PATCH] fix: closes #2 --- src/operators.YAML-tmLanguage | 8 ++++++-- tests/operators.test.gp | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/operators.YAML-tmLanguage b/src/operators.YAML-tmLanguage index ebcaf82..12771f4 100644 --- a/src/operators.YAML-tmLanguage +++ b/src/operators.YAML-tmLanguage @@ -44,5 +44,9 @@ repository: match: "(\\')(?!\\b)" name: keyword.operator.derivative.parigp - - match: '(\#)\b\s*(?!$)' - name: keyword.operator.cardinality.parigp + match: '(\#)(\s*)(?!$)' + captures: + 1: + name: keyword.operator.cardinality.parigp + 2: + name: constant.character.whitespace.parigp diff --git a/tests/operators.test.gp b/tests/operators.test.gp index 1467f28..917b016 100644 --- a/tests/operators.test.gp +++ b/tests/operators.test.gp @@ -101,3 +101,12 @@ ## ^^ source.parigp keyword.operator.shift.parigp ## ^ source.parigp constant.numeric.int.parigp ## ^ source.parigp markup.punctuation.statement-terminator.parigp + + # [1, 2, 3] +##^ source.parigp keyword.operator.cardinality.parigp +## ^ source.parigp constant.character.whitespace.parigp +## ^ source.parigp meta.brackets.parigp punctuation.section.brackets.begin.parigp +## ^ ^ ^ source.parigp meta.brackets.parigp constant.numeric.int.parigp +## ^ ^ source.parigp meta.brackets.parigp markup.punctuation.separator.parigp +## ^ ^ source.parigp meta.brackets.parigp constant.character.whitespace.parigp +## ^ source.parigp meta.brackets.parigp punctuation.section.brackets.end.parigp