From 3ee26cf91f28cfac9d0f862849118c93643ea2ba Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 26 Oct 2026 11:17:06 +0100 Subject: [PATCH] build(deps): bump tree-sitter-markdown to v0.5.4 (#42520) Grammar added `info_string` field name for `(info_string)` nodes (allowing, e.g., to set a default injection language for code blocks without annotations). * adapt markdown code annotation extractor that hard-coded assumptions on field names * adapt inspector tests to changed parse tree --- build.zig.zon | 4 ++-- cmake.deps/deps.txt | 4 ++-- src/gen/util.lua | 2 +- test/functional/treesitter/inspect_tree_spec.lua | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 91569bc6b1..e81c840e11 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -53,8 +53,8 @@ .hash = "tree_sitter_c-0.24.2-y5boS-ptQADHoCoVfjGT_nFtFQ5LbomIkW0fxG3_cmdB", }, .treesitter_markdown = .{ - .url = "git+https://github.com/tree-sitter-grammars/tree-sitter-markdown?ref=v0.5.3#f969cd3ae3f9fbd4e43205431d0ae286014c05b5", - .hash = "N-V-__8AAOphUwCl_jXY5BvJ_I-kB6cZuE48ZpMar9Gq2SiD", + .url = "git+https://github.com/tree-sitter-grammars/tree-sitter-markdown?ref=v0.5.4#41ff24a6c775492c543b09228aeb98d1cd2b3a0f", + .hash = "N-V-__8AAP9XVABr5KsZTXvcDyJk7qu2PQc0r4e1uFczkpyy", }, .treesitter_lua = .{ .url = "git+https://github.com/tree-sitter-grammars/tree-sitter-lua?ref=v0.5.0#10fe0054734eec83049514ea2e718b2a56acd0c9", diff --git a/cmake.deps/deps.txt b/cmake.deps/deps.txt index 21b6853cc6..a263eed756 100644 --- a/cmake.deps/deps.txt +++ b/cmake.deps/deps.txt @@ -44,8 +44,8 @@ TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v4.3. TREESITTER_VIMDOC_SHA256 4c46119abf86fcb29bc66878eb9a37666a936589769bea2b76308cd2119dfaf5 TREESITTER_QUERY_URL https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.8.0.tar.gz TREESITTER_QUERY_SHA256 c2b23b9a54cffcc999ded4a5d3949daf338bebb7945dece229f832332e6e6a7d -TREESITTER_MARKDOWN_URL https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/v0.5.3.tar.gz -TREESITTER_MARKDOWN_SHA256 df845b1ab7c7c163ec57d7fa17170c92b04be199bddab02523636efec5224ab6 +TREESITTER_MARKDOWN_URL https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/v0.5.4.tar.gz +TREESITTER_MARKDOWN_SHA256 481ce2c1cce7b1130bc8455c186052bd0fa461f1ff488666994c6a3da7fca2ac TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.27.1.tar.gz TREESITTER_SHA256 982cd3d4d9eb7be18c243240a622423fd2e4ecb4bec2cd98832c2f3fa1f0f333 diff --git a/src/gen/util.lua b/src/gen/util.lua index c1d94fa715..0123305898 100644 --- a/src/gen/util.lua +++ b/src/gen/util.lua @@ -162,7 +162,7 @@ local function parse_md(text) for child, child_field in node:iter_children() do local e = extract(child) - if child_field then + if child_field and child_field ~= 'info_string' then ret[child_field] = e else table.insert(ret, e) diff --git a/test/functional/treesitter/inspect_tree_spec.lua b/test/functional/treesitter/inspect_tree_spec.lua index ff5b447fc5..a81f12f0fc 100644 --- a/test/functional/treesitter/inspect_tree_spec.lua +++ b/test/functional/treesitter/inspect_tree_spec.lua @@ -108,7 +108,7 @@ describe('vim.treesitter.inspect_tree', function() (section ; [0, 0] - [4, 0] (fenced_code_block ; [0, 0] - [3, 0] (fenced_code_block_delimiter) ; [0, 0] - [0, 3] - (info_string ; [0, 3] - [0, 6] + info_string: (info_string ; [0, 3] - [0, 6] (language)) ; [0, 3] - [0, 6] (block_continuation) ; [1, 0] - [1, 0] (code_fence_content ; [1, 0] - [2, 0] @@ -177,7 +177,7 @@ describe('vim.treesitter.inspect_tree', function() (section ; [0, 0] - [4, 0] markdown (fenced_code_block ; [0, 0] - [3, 0] markdown (fenced_code_block_delimiter) ; [0, 0] - [0, 3] markdown - (info_string ; [0, 3] - [0, 6] markdown + info_string: (info_string ; [0, 3] - [0, 6] markdown (language)) ; [0, 3] - [0, 6] markdown (block_continuation) ; [1, 0] - [1, 0] markdown (code_fence_content ; [1, 0] - [2, 0] markdown