   "Returns t if the current line can have lines nested beneath it."
   (let ((attr-props (haml-parse-multiline-attr-hash)))
     (when attr-props
-      (end-of-line)
       (return-from haml-indent-p
-        (if (eq (char-before) ?,) (cdr (assq 'hash-indent attr-props))
-          (beginning-of-line)
+        (if (haml-unclosed-attr-hash-p) (cdr (assq 'hash-indent attr-props))
           (list (+ (cdr (assq 'indent attr-props)) haml-indent-offset) nil)))))
   (loop for opener in haml-block-openers
         if (looking-at opener) return t

        (forward-char -1)
        (looking-at "\\(\\)"))
      t)))

(defun haml-highlight-interpolation (limit)
  "Highlight Ruby interpolation (#{foo})."

      (forward-char -1)

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

      (block loop
        (while t
          (case (char-after)
            ;; Highlight obj refs
            (?\[
             (let ((beg (point)))
               (haml-limited-forward-sexp eol)
               (haml-fontify-region-as-ruby beg (point))))
            ;; Highlight new attr hashes
            (?\(
             (forward-char 1)
             (while (haml-parse-new-attr-hash
                     (lambda (type beg end)
                       (case type
                         (name (put-text-property beg end 'face font-lock-constant-face))
                         (value (haml-fontify-region-as-ruby beg end)))))
               (end-of-line)
               (when (eobp) (return-from loop))
               (forward-line 1)
               (beginning-of-line)))
            ;; Highlight old attr hashes
            (?\{
             (let ((beg (point)))
               (haml-limited-forward-sexp eol)

               ;; Check for multiline
               (while (and (eolp) (eq (char-before) ?,) (not (eobp)))
                 (forward-line)
                 (let ((eol (save-excursion (end-of-line) (point))))
                   ;; If no sexps are closed,
                   ;; we're still continuing a  multiline hash
                   (if (>= (car (parse-partial-sexp (point) eol)) 0)
                       (end-of-line)
                     ;; If sexps have been closed,
                     ;; set the point at the end of the total sexp
                     (goto-char beg)
                     (haml-limited-forward-sexp eol))))

               (haml-fontify-region-as-ruby (+ 1 beg) (point))))
            (t (return-from loop)))))

      ;; Move past end chars
      (when (looking-at "[<>&!]+") (goto-char (match-end 0)))
