Function: web-mode-jsx-skip2

web-mode-jsx-skip2 is a natively compiled function defined in web-mode.el.

Signature

(web-mode-jsx-skip2 REG-END)

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-jsx-skip2 (reg-end)
  (let ((continue t) (pos nil) (i 0))
    (looking-at "<\\([[:alpha:]][[:alnum:]:-]*\\)")
    ;; (let ((tag (match-string-no-properties 1)))
    ;;   (message "point=%S tag=%S" (point) tag))
    (save-excursion
      (while continue
        (cond
          ((> (setq i (1+ i)) 1000)
           (message "jsx-skip ** warning **")
           (setq continue nil))
          ((looking-at "<[[:alpha:]][[:alnum:]:-]*[ ]*/>")
           (goto-char (match-end 0))
           (setq pos (point))
           (setq continue nil))
          ((not (web-mode-dom-rsf ">\\([ \t\n]*[\];,)':}|&]\\)\\|{" reg-end))
           (setq continue nil)
           )
          ((eq (char-before) ?\{)
           (backward-char)
           (web-mode-closing-paren reg-end)
           (forward-char)
           )
          (t
           (setq continue nil)
           (setq pos (match-beginning 1))
           ) ;t
          ) ;cond
        ) ;while
      ) ;save-excursion
    (when pos (goto-char pos))
    ;;(message "jsx-skip: %S" pos)
    pos))