Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions haskell-font-lock.el
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,12 @@ like ::, class, instance, data, newtype, type."
(while (setq next (next-single-property-change pos 'face))
(put-text-property
(+ start (1- pos)) (1- (+ start next)) 'face
(get-text-property pos 'face) org-buffer)
(setq pos next)))
(or (get-text-property pos 'face) 'default) org-buffer)
(setq pos next))
(unless (equal pos (point-max))
(put-text-property
(+ start (1- pos)) (1- (+ start (point-max))) 'face
'default org-buffer)))
(add-text-properties
start end
'(font-lock-fontified t fontified t font-lock-multiline t))
Expand Down
9 changes: 4 additions & 5 deletions tests/haskell-font-lock-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,18 @@
(check-properties
'("sql = [sql| SELECT title FROM books; |]")
'(("SELECT" t font-lock-keyword-face)
("title" t nil)
("title" t default)
("FROM" t font-lock-keyword-face)
("books" t nil))))
("books" t default))))

(ert-deftest haskell-syntactic-test-quasiquoter-sql-2 ()
"Embedded SQL statements"
:expected-result :failed
;; for now we have this problem that connstructor faces are used,
;; org-mode knows how to get around this problem
(check-properties
'("sql = [sql| SELECT Title FROM Books; |]")
'(("Title" t nil)
("Books" t nil))))
'(("Title" t default)
("Books" t default))))


(ert-deftest haskell-syntactic-test-special-not-redefined ()
Expand Down