https://github.com/docling-project/docling-core/blob/ffe48dbe991bca46c8fb2e3e9b6447dbd4924731/docling_core/transforms/chunker/code_chunking/_utils.py#L157C1-L162C38
patching the _utils file with
...
from tree_sitter import Node, Tree, QueryCursor
...
def _query_tree(language, tree: Tree, query: str):
"""Query a tree-sitter tree with the given query string."""
if not language:
return []
q = language.query(query)
return QueryCursor(q).captures(tree.root_node)
seems to fix the issue.
https://github.com/docling-project/docling-core/blob/ffe48dbe991bca46c8fb2e3e9b6447dbd4924731/docling_core/transforms/chunker/code_chunking/_utils.py#L157C1-L162C38
patching the _utils file with
seems to fix the issue.