Commit c6b0a84d authored by waern's avatar waern
Browse files

Merge from Haddock: Add <<url>> for images

A merge of this patch:

  Mon Aug  7 16:22:14 CEST 2006  Simon Marlow <simonmar@microsoft.com>
    * Add <<url>> for images
    Submitted by: Lennart Augustsson

Please merge to the 6.8.2 branch.
parent ba00f074
......@@ -34,6 +34,7 @@ data HsDoc id
| DocDefList [(HsDoc id, HsDoc id)]
| DocCodeBlock (HsDoc id)
| DocURL String
| DocPic String
| DocAName String
deriving (Eq, Show)
......
......@@ -14,6 +14,7 @@ data Token
| TokIdent [RdrName]
| TokString String
| TokURL String
| TokPic String
| TokEmphasis String
| TokAName String
| TokBirdTrack String
......@@ -67,6 +67,7 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~]
<string,def> {
$special { strtoken $ \s -> TokSpecial (head s) }
\<\<.*\>\> { strtoken $ \s -> TokPic (init $ init $ tail $ tail s) }
\<.*\> { strtoken $ \s -> TokURL (init (tail s)) }
\#.*\# { strtoken $ \s -> TokAName (init (tail s)) }
\/ [^\/]* \/ { strtoken $ \s -> TokEmphasis (init (tail s)) }
......@@ -102,6 +103,7 @@ data Token
| TokIdent [RdrName]
| TokString String
| TokURL String
| TokPic String
| TokEmphasis String
| TokAName String
| TokBirdTrack String
......
......@@ -21,6 +21,7 @@ import RdrName
']' { TokDefEnd }
DQUO { TokSpecial '\"' }
URL { TokURL $$ }
PIC { TokPic $$ }
ANAME { TokAName $$ }
'/../' { TokEmphasis $$ }
'-' { TokBullet }
......@@ -83,6 +84,7 @@ elem1 :: { HsDoc RdrName }
: STRING { DocString $1 }
| '/../' { DocEmphasis (DocString $1) }
| URL { DocURL $1 }
| PIC { DocPic $1 }
| ANAME { DocAName $1 }
| IDENT { DocIdentifier $1 }
| DQUO strings DQUO { DocModule $2 }
......
......@@ -104,4 +104,6 @@ rnHsDoc doc = case doc of
DocURL str -> return (DocURL str)
DocPic str -> return (DocPic str)
DocAName str -> return (DocAName str)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment