diff options
author | simonmar <unknown> | 2002-04-24 15:12:41 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-04-24 15:12:41 +0000 |
commit | 106adbbe619e9bd42a6ca00f097d3eb22011f6f5 (patch) | |
tree | 22529a2cebcdee21d1e86190c2a677d2c2d43b36 | |
parent | fe9b10f8c0758645c680b339b8cc26bfb25697e8 (diff) |
[haddock @ 2002-04-24 15:12:41 by simonmar]
Stop slurping comment lines when we see a row of dashes longer than
length 2: these are useful as separators.
-rw-r--r-- | src/HsLexer.lhs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/HsLexer.lhs b/src/HsLexer.lhs index d55b5ef0..ac5fa9ae 100644 --- a/src/HsLexer.lhs +++ b/src/HsLexer.lhs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: HsLexer.lhs,v 1.2 2002/04/09 11:23:24 simonmar Exp $ +-- $Id: HsLexer.lhs,v 1.3 2002/04/24 15:12:41 simonmar Exp $ -- -- (c) The GHC Team, 1997-2000 -- @@ -561,8 +561,12 @@ slurpExtraCommentLines s lines y = case rest of '\n':nextline -> case dropWhile nonNewlineSpace nextline of - '-':'-':s -> slurpExtraCommentLines s - ((line++"\n"):lines) (y+1) + -- stop slurping if we see a string of more than two '-'; + -- strings of dashes are useful as separators but we don't + -- want them in the doc. + '-':'-':c:s | c /= '-' + -> slurpExtraCommentLines (c:s) + ((line++"\n"):lines) (y+1) _ -> (rest, finished, y) other -> (rest, finished, y) where |