Function: web-mode-attribute-next-position

web-mode-attribute-next-position is a natively compiled function defined in web-mode.el.

Signature

(web-mode-attribute-next-position &optional POS LIMIT)

Source Code

;; Defined in /nix/store/2qgnz1rp30nzfz6w0apx4kdm14if1bbs-emacs-packages-deps/share/emacs/site-lisp/elpa/web-mode-20260831.219/web-mode.el
;; attention si pos est au debut d'un spread attributes, cela
;; risque de poser pb
(defun web-mode-attribute-next-position (&optional pos limit)
  (unless pos (setq pos (point)))
  (unless limit (setq limit (point-max)))
  (let (continue depth)
    (when (get-text-property pos 'tag-attr-beg)
      (setq pos (1+ pos)))
    (if (< pos limit)
        (setq continue t
              depth (get-text-property pos 'jsx-depth))
        (setq continue nil
              pos nil))
    (while continue
      (setq pos (next-single-property-change pos 'tag-attr-beg))
      (cond
        ((null pos)
         (setq continue nil))
        ((>= pos limit)
         (setq continue nil
               pos nil))
        ((null depth)
         (setq continue nil))
        ((and (eq (get-text-property pos 'tag-attr-beg) 4)
              (eq (1+ depth) (get-text-property pos 'jsx-depth)))
         (setq continue nil))
        ((eq depth (get-text-property pos 'jsx-depth))
         (setq continue nil))
        (t
         (setq pos (1+ pos)
               continue (< pos limit)))
        )
      ) ;while
    pos))