aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-05-06 12:49:21 +0000
committersimonmar <unknown>2002-05-06 12:49:21 +0000
commit8f29f69631075577d3a0ed6a9571102a82e9c94f (patch)
treee19ae6804ec43b075551d13c7aedba893954e34f /src/Main.hs
parent687e68fa7bd127d6f01d5847182863ed302be99f (diff)
[haddock @ 2002-05-06 12:49:21 by simonmar]
Fix silly bug in named documentation block lookup.
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 9873d2f8..08a70bde 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -591,8 +591,9 @@ findNamedDoc str decls =
where search [] = Nothing
search (HsDocCommentNamed str : rest) =
case matchRegexAll docNameRE str of
- Nothing -> search rest
- Just (_, _, after, _, _) -> Just after
+ Just (_, _, after, _, name':_)
+ | name == name' -> Just after
+ _otherwise -> search rest
search (_other_decl : rest) = search rest
_other -> Nothing