From ae71888b92eda16e5025d8fef5460a756bb3a349 Mon Sep 17 00:00:00 2001 From: Karl Smeltzer Date: Fri, 27 Feb 2015 10:03:33 -0800 Subject: [PATCH 1/2] Fix Haddock comment regexp --- haskell-font-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-font-lock.el b/haskell-font-lock.el index adc724b20..a6c0fb15f 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -567,7 +567,7 @@ that should be commented under LaTeX-style literate scripts." ((and haskell-font-lock-haddock (save-excursion (goto-char (nth 8 state)) - (or (looking-at "[{-]-[ \\t]*[|^*]") + (or (looking-at "\\({-[ ]?\\|-- \\)[|^*]") (and haskell-font-lock-seen-haddock (looking-at "--") (let ((doc nil) From e2d139b1417d0535665162f1a9adfda49ae3f0a9 Mon Sep 17 00:00:00 2001 From: Karl Smeltzer Date: Sun, 1 Mar 2015 22:01:19 -0800 Subject: [PATCH 2/2] Clean Haddock comment regexp and docsym --- haskell-font-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-font-lock.el b/haskell-font-lock.el index a6c0fb15f..db96ee8c0 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -567,7 +567,7 @@ that should be commented under LaTeX-style literate scripts." ((and haskell-font-lock-haddock (save-excursion (goto-char (nth 8 state)) - (or (looking-at "\\({-[ ]?\\|-- \\)[|^*]") + (or (looking-at "\\(?:{- ?\\|-- \\)[|^*$]") (and haskell-font-lock-seen-haddock (looking-at "--") (let ((doc nil)