Function: hpath:dashes-to-spaces-markup-anchor

hpath:dashes-to-spaces-markup-anchor is a byte-compiled function defined in hpath.el.

Signature

(hpath:dashes-to-spaces-markup-anchor ANCHOR)

Documentation

Replace dashes with spaces in ANCHOR if not a prog mode and no existing spaces.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hpath.el
(defun hpath:dashes-to-spaces-markup-anchor (anchor)
  "Replace dashes with spaces in ANCHOR if not a prog mode and no existing spaces."
  (if (or (derived-mode-p 'prog-mode)
	  (string-match-p "-.* \\| .*-" anchor))
      anchor
    ;; In Markdown or outline modes '-' characters in `anchor' are
    ;; converted to spaces at the point of definition unless anchor
    ;; contains both '-' and space characters, in which case no
    ;; conversion occurs.
    (subst-char-in-string ?- ?\  anchor)))