Function: hydra--strip-align-markers

hydra--strip-align-markers is a byte-compiled function defined in hydra.el.

Signature

(hydra--strip-align-markers STR)

Documentation

Remove ^ from STR, unless they're escaped: \^.

Source Code

;; Defined in ~/.emacs.d/elpa/hydra-20250316.1254/hydra.el
(defun hydra--strip-align-markers (str)
  "Remove ^ from STR, unless they're escaped: \\^."
  (let ((start 0))
    (while (setq start (string-match "\\\\?\\^" str start))
      (if (eq (- (match-end 0) (match-beginning 0)) 2)
          (progn
            (setq str (replace-match "^" nil nil str))
            (cl-incf start))
        (setq str (replace-match "" nil nil str))))
    str))