Function: markdown-ts-code-block-language-at

markdown-ts-code-block-language-at is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts-code-block-language-at &optional POS)

Documentation

Return the language symbol of the code block at POS.

If POS is nil, use point. Returns nil if POS is not inside a fenced code block. This works regardless of whether a guest tree-sitter parser is active, since the language is stored on the code block overlay by the host parser's fontification.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts-code-block-language-at (&optional pos)
  "Return the language symbol of the code block at POS.
If POS is nil, use point.  Returns nil if POS is not inside a fenced
code block.  This works regardless of whether a guest tree-sitter parser
is active, since the language is stored on the code block overlay by the
host parser's fontification."
  (cl-some (lambda (ov) (overlay-get ov 'markdown-ts-code-block-language))
           (overlays-at (or pos (point)))))