Subject: [bug#70146] [PATCH 139/147] gnu: tree-sitter-css: Update to 0.20.0-1.02b4ee7.

From: Jean-Pierre De Jesus DIAZ <[email-masked]>
Date: Tue, 2 Apr 2024 18:05:31 +0200

* gnu/packages/tree-sitter.scm (tree-sitter-css): Update to
0.20.0-1.02b4ee7.

Change-Id: Ibaf312370cfeeae455ad285202cdf93d21739369
---
 gnu/packages/tree-sitter.scm | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index d3fa55b57b..edd0dfa455 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -418,10 +418,28 @@ (define-public tree-sitter-bibtex
      #:license license:expat)))
 
 (define-public tree-sitter-css
-  (tree-sitter-grammar
-   "css" "CSS"
-   "014jrlgi7zfza9g38hsr4vlbi8964i5p7iglaih6qmzaiml7bja2"
-   "0.19.0"))
+  (let* ((commit "02b4ee757654b7d54fe35352fd8e53a8a4385d42")
+        (revision "1")
+        (base (tree-sitter-grammar
+               "css" "CSS"
+               "0j1kg16sly7xsvvc3kxyy5zaznlbz7x2j2bwwv1r1nki2249ly12"
+               (git-version "0.20.0" revision commit)
+               #:commit commit)))
+    (package
+      (inherit base)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases #~%standard-phases)
+          #~(modify-phases #$phases
+              ;; NOTE: Remove this once tree-sitter-cli is update to fix this
+              ;; error.
+              ;;
+              ;; See <https://github.com/tree-sitter/tree-sitter/issues/3238>.
+              (add-before 'check 'fix-failing-test
+                (lambda _
+                  (substitute* "test/corpus/selectors.txt"
+                    (("::slotted pseudo element")
+                     "slotted pseudo element")))))))))))
 
 (define-public tree-sitter-c
   (tree-sitter-grammar
-- 
2.41.0