Function: markdown-ts--fontify-backslash-escape

markdown-ts--fontify-backslash-escape is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts--fontify-backslash-escape NODE OVERRIDE START END &rest _)

Documentation

Fontify backslash escape NODE, hiding the backslash when markup is hidden.

Skip hiding inside latex_block where backslashes are LaTeX syntax. OVERRIDE, START, and END are passed through to treesit-fontify-with-override.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts--fontify-backslash-escape (node override start end &rest _)
  "Fontify backslash escape NODE, hiding the backslash when markup is hidden.
Skip hiding inside `latex_block' where backslashes are LaTeX syntax.
OVERRIDE, START, and END are passed through to
`treesit-fontify-with-override'."
  (let ((node-start (treesit-node-start node))
        (in-latex (equal (treesit-node-type (treesit-node-parent node))
                         "latex_block")))
    (treesit-fontify-with-override
     node-start (1+ node-start)
     'markdown-ts-delimiter override start end)
    (when (and markdown-ts-hide-markup (not in-latex))
      (put-text-property node-start (1+ node-start)
                         'invisible 'markdown-ts--markup))))