diff options
author | simonmar <unknown> | 2002-07-25 14:37:29 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-07-25 14:37:29 +0000 |
commit | d6edc43ef6c96e1c2c0c0564cfe502f17d0a53ed (patch) | |
tree | c0ea7ef6e0512a365c4b1c7bea3a967ced615879 /src/HaddockParse.y | |
parent | 4d8d5e948cd6620ed923bf7b11ce408a728e3521 (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/HaddockParse.y')
-rw-r--r-- | src/HaddockParse.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/HaddockParse.y b/src/HaddockParse.y index d9de9110..15eda968 100644 --- a/src/HaddockParse.y +++ b/src/HaddockParse.y @@ -10,6 +10,7 @@ import HsSyn %token '/' { TokSpecial '/' } '@' { TokSpecial '@' } DQUO { TokSpecial '\"' } + '#' { TokSpecial '#' } URL { TokURL $$ } '*' { TokBullet } '(n)' { TokNumber } @@ -65,6 +66,7 @@ seq1 :: { Doc } elem1 :: { Doc } : STRING { DocString $1 } | '/' STRING '/' { DocEmphasis (DocString $2) } + | '#' STRING '#' { DocAName $2 } | URL { DocURL $1 } | IDENT { DocIdentifier $1 } | DQUO STRING DQUO { DocModule $2 } |