From d6edc43ef6c96e1c2c0c0564cfe502f17d0a53ed Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 25 Jul 2002 14:37:29 +0000 Subject: [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. --- src/HaddockLex.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/HaddockLex.hs') diff --git a/src/HaddockLex.hs b/src/HaddockLex.hs index fdfc743a..b1de971e 100644 --- a/src/HaddockLex.hs +++ b/src/HaddockLex.hs @@ -23,10 +23,11 @@ data Token | TokString String | TokURL String | TokBirdTrack + | TokAName String deriving Show isSpecial, isSingleQuote, isIdent :: Char -> Bool -isSpecial c = c `elem` ['\"', '@', '/'] +isSpecial c = c `elem` ['\"', '@', '/', '#'] isSingleQuote c = c `elem` ['\'', '`'] isIdent c = isAlphaNum c || c `elem` "_.!#$%&*+/<=>?@\\^|-~" -- cgit v1.2.3