Skip to content

Commit

Permalink
When matching ".", "#", "%" elements, require at least one subsequent…
Browse files Browse the repository at this point in the history
… name char
  • Loading branch information
purcell committed Nov 24, 2012
1 parent 56ced7c commit c1809b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions haml-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The function can also return a positive integer to indicate
a specific level to which the current line could be indented.")

(defconst haml-tag-beg-re
"^[ \t]*\\(?:[%\\.#][a-z0-9_:\\-]*\\)+\\(?:(.*)\\|{.*}\\|\\[.*\\]\\)*"
"^[ \t]*\\(?:[%\\.#][a-z0-9_:\\-]+\\)+\\(?:(.*)\\|{.*}\\|\\[.*\\]\\)*"
"A regexp matching the beginning of a Haml tag, through (), {}, and [].")

(defvar haml-block-openers
Expand Down Expand Up @@ -256,7 +256,7 @@ For example, this will highlight all of the following:
(forward-char -1)

;; Highlight tag, classes, and ids
(while (haml-move "\\([.#%]\\)[a-z0-9_:\\-]*")
(while (haml-move "\\([.#%]\\)[a-z0-9_:\\-]+")
(put-text-property (match-beginning 0) (match-end 0) 'font-lock-face
(case (char-after (match-beginning 1))
(?% font-lock-function-name-face)
Expand Down

0 comments on commit c1809b2

Please sign in to comment.