diff options
Diffstat (limited to 'src/elisp')
-rw-r--r-- | src/elisp/urweb-mode.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/elisp/urweb-mode.el b/src/elisp/urweb-mode.el index c4cb3476..ea14b4e1 100644 --- a/src/elisp/urweb-mode.el +++ b/src/elisp/urweb-mode.el @@ -185,7 +185,22 @@ See doc for the variable `urweb-mode-info'." (setq answer t) (setq finished t)))) ((looking-at "</xml>") - (incf depth)))) + (incf depth)) + + ((and (= depth 0) + (not (looking-at "<xml")) ;; ignore <xml/> + (eq font-lock-tag-face + (get-text-property (point) 'face))) + ;; previous code was highlighted as tag, seems we are in xml + (progn + (setq answer t) + (setq finished t))) + + ((= depth 0) + ;; previous thing was a tag like, but not tag + ;; seems we are in usual code or comment + (setq finished t)) + )) answer))) (defun amAttribute (face) |