Function: markdown-ts--imenu-code-block-node-p

markdown-ts--imenu-code-block-node-p is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts--imenu-code-block-node-p NODE)

Documentation

Check if NODE is an info_string with descriptive text after the language.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts--imenu-code-block-node-p (node)
  "Check if NODE is an info_string with descriptive text after the language."
  (and (equal (treesit-node-type node) "info_string")
       (when-let* ((lang-node (treesit-search-subtree node "language"))
                   ((< (treesit-node-end lang-node)
                       (treesit-node-end node))))
         (not (string-blank-p
               (buffer-substring-no-properties
                (treesit-node-end lang-node)
                (treesit-node-end node)))))))