Function: markdown-ts--list-item-depth
markdown-ts--list-item-depth is a byte-compiled function defined in
markdown-ts-mode.el.gz.
Signature
(markdown-ts--list-item-depth NODE)
Documentation
Compute the depth of list NODE relative to its parents.
NODE can be a list, list_item, or one of the list_marker_'s. If NODE is not in a list, return -1.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts--list-item-depth (node)
"Compute the depth of list NODE relative to its parents.
NODE can be a list, list_item, or one of the list_marker_'s.
If NODE is not in a list, return -1."
(let ((depth -1))
(while (and node
(not (equal (treesit-node-type node) "section")))
(when (equal (treesit-node-type node) "list")
(setq depth (1+ depth)))
(setq node (treesit-node-parent node)))
depth))