summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/elisp/urweb-mode.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/elisp/urweb-mode.el b/src/elisp/urweb-mode.el
index ea14b4e1..b9ffaf10 100644
--- a/src/elisp/urweb-mode.el
+++ b/src/elisp/urweb-mode.el
@@ -170,7 +170,7 @@ See doc for the variable `urweb-mode-info'."
(finished nil)
(answer nil)
)
- (while (and (not finished) (re-search-backward "[<{}]" nil t))
+ (while (and (not finished) (re-search-backward "[-<{}]" nil t))
(cond
((looking-at "{")
(if (> depth 0)
@@ -187,6 +187,10 @@ See doc for the variable `urweb-mode-info'."
((looking-at "</xml>")
(incf depth))
+ ((looking-at "-")
+ (if (looking-at "->")
+ (setq finished (= depth 0))))
+
((and (= depth 0)
(not (looking-at "<xml")) ;; ignore <xml/>
(eq font-lock-tag-face