From 1cb01275b8640a8074b87b200e8cd8fdbe67579f Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 18 Jul 2012 04:04:23 +0400 Subject: [PATCH] Allow trailing whitespace after filter instruction Refs #13 --- haml-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haml-mode.el b/haml-mode.el index 81a48466..aff47ce6 100644 --- a/haml-mode.el +++ b/haml-mode.el @@ -89,7 +89,7 @@ be matched by a regexp in this list.") (defun haml-nested-regexp (re) "Create a regexp to match a block starting with RE. The line containing RE is matched, as well as all lines indented beneath it." - (concat "^\\([ \t]*\\)" re "\\(\n\\(?:\\(?:\\1 .*\\| *\\)\n\\)*\\(?:\\1 .*\\| *\\)?\\)?")) + (concat "^\\([ \t]*\\)" re "[ \t]*\\(\n\\(?:\\(?:\\1 .*\\| *\\)\n\\)*\\(?:\\1 .*\\| *\\)?\\)?")) (defconst haml-font-lock-keywords `((,(haml-nested-regexp "\\(?:-#\\|/\\).*") 0 font-lock-comment-face)