Function: markdown-ts--heading-text-and-id

markdown-ts--heading-text-and-id is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts--heading-text-and-id RAW)

Documentation

Split RAW heading text into (VISIBLE . EXPLICIT-ID).

EXPLICIT-ID is non-nil if RAW ends with a Pandoc-style {#id}, in which case VISIBLE is RAW with that suffix removed.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts--heading-text-and-id (raw)
  "Split RAW heading text into (VISIBLE . EXPLICIT-ID).
EXPLICIT-ID is non-nil if RAW ends with a Pandoc-style `{#id}',
in which case VISIBLE is RAW with that suffix removed."
  (if (string-match markdown-ts--explicit-id-re raw)
      (cons (substring raw 0 (match-beginning 0))
            (match-string 1 raw))
    (cons raw nil)))