aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockLex.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-07-25 14:37:29 +0000
committersimonmar <unknown>2002-07-25 14:37:29 +0000
commitd6edc43ef6c96e1c2c0c0564cfe502f17d0a53ed (patch)
treec0ea7ef6e0512a365c4b1c7bea3a967ced615879 /src/HaddockLex.hs
parent4d8d5e948cd6620ed923bf7b11ce408a728e3521 (diff)
[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 <a name="foo"></a> 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.
Diffstat (limited to 'src/HaddockLex.hs')
-rw-r--r--src/HaddockLex.hs3
1 files changed, 2 insertions, 1 deletions
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` "_.!#$%&*+/<=>?@\\^|-~"