Function: denote-get-file-type-markdown-yaml

denote-get-file-type-markdown-yaml is a byte-compiled function defined in denote.el.

Signature

(denote-get-file-type-markdown-yaml FILE)

Documentation

Return markdown-yaml if FILE has YAML front matter.

YAML front matter starts with --- on the first line.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-get-file-type-markdown-yaml (file)
  "Return `markdown-yaml' if FILE has YAML front matter.
YAML front matter starts with --- on the first line."
  (with-temp-buffer
    (insert-file-contents file)
    (goto-char (point-min))
    (when (looking-at (format "^%s" (make-string 3 ?-)))
      'markdown-yaml)))