Function: web-mode-django-skip

web-mode-django-skip is a natively compiled function defined in web-mode.el.

Signature

(web-mode-django-skip REG-BEG 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-django-skip (reg-beg reg-end)
  (let (regexp char pos inc continue found)
    (setq regexp "[\"'{}]"
          inc 0)
    (while (and (not found) (re-search-forward regexp reg-end t))
      (setq char (char-before))
      (cond
        ((get-text-property (point) 'block-side)
         (setq found t))
        ((eq char ?\{)
         (setq inc (1+ inc)))
        ((eq char ?\})
         (cond
           ((and (not (eobp))
                 (eq (char-after) ?\})
                 (< inc 2))
            (forward-char)
            (setq found t
                  pos (1+ (point))))
           ((> inc 0)
            (setq inc (1- inc)))
           )
         )
        ((eq char ?\')
         (setq continue t)
         (while (and continue (search-forward "'" reg-end t))
           (setq continue (web-mode-string-continue-p reg-beg))
           )
         )
        ((eq char ?\")
         (setq continue t)
         (while (and continue (search-forward "\"" reg-end t))
           (setq continue (web-mode-string-continue-p reg-beg))
           )
         )
        ) ;cond
      ) ;while
    pos))