)
where
-import Data.Char
import Rakka.Wiki
import Text.ParserCombinators.Parsec
pageLink :: Parser InlineElement
pageLink = do string "[["
- page <- option Nothing $
- do x <- satisfy (\ c -> not (elem c "#|]" || isLower c))
- xs <- many (noneOf "#|]")
- return $ Just (x:xs)
+ page <- option Nothing
+ (many1 (noneOf "#|]") >>= return . Just)
fragment <- option Nothing
(char '#' >> many1 (noneOf "|]") >>= return . Just)
text <- option Nothing