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