Function: web-mode-dom-apostrophes-replace

web-mode-dom-apostrophes-replace is an interactive and natively compiled function defined in web-mode.el.

Signature

(web-mode-dom-apostrophes-replace)

Documentation

Replace char(') with char(’) in the innerText of html elements.

Key Bindings

web-mode-map C-c C-d a

Source Code

;; Defined in /nix/store/2qgnz1rp30nzfz6w0apx4kdm14if1bbs-emacs-packages-deps/share/emacs/site-lisp/elpa/web-mode-20260831.219/web-mode.el
(defun web-mode-dom-apostrophes-replace ()
  "Replace char(') with char(’) in the innerText of html elements."
  (interactive)
  (save-excursion
    (let ((min (point-min)) (max (point-max)))
      (when mark-active
        (setq min (region-beginning)
              max (region-end))
        (deactivate-mark))
      (goto-char min)
      (while (web-mode-content-rsf "\\([[:alpha:]]\\)'\\([[:alpha:]]\\)" max)
        (replace-match "\\1’\\2"))
      )))