-objLink = do try (string "[[[")
- page <- many1 (noneOf "|]")
- text <- option Nothing
- (char '|' >> many1 (satisfy (/= ']')) >>= return . Just)
- string "]]]"
- return $ ObjectLink page text
+objLink = do _ <- try (string "[[[")
+ page <- many1 (noneOf "|]")
+ label <- option Nothing
+ (liftM Just (char '|' >> many1 (satisfy (/= ']'))))
+ _ <- string "]]]"
+ return $ ObjectLink page label