]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Parser.hs
Wrote more
[Rakka.git] / Rakka / Wiki / Parser.hs
index 6c5d20722c89f8243b8accc45fe193d771b33f8b..7e0c1a90b8517037a10db00011bf630cb9be5d72 100644 (file)
@@ -272,8 +272,7 @@ blockCmd cmdTypeOf
       undefinedCmdErr name
           = Div [("class", "error")]
             [ Paragraph [Text ("The command `" ++ name ++ "' is not defined. " ++
-                               "Ensure that you haven't mistyped and the module " ++
-                               "providing the command is actually loaded.")
+                               "Make sure you haven't mistyped.")
                         ]
             ]
 
@@ -284,6 +283,7 @@ inlineElement cmdTypeOf
                foldr (<|>) pzero [ cdata
                                  , apostrophes cmdTypeOf
                                  , text
+                                 , objLink
                                  , pageLink
                                  , extLink
                                  , inlineCmd cmdTypeOf
@@ -345,6 +345,17 @@ apostrophes cmdTypeOf = foldr (<|>) pzero (map try [apos1, apos2, apos3, apos4,
       apos n = count n (char '\'') >> notFollowedBy (char '\'')
 
 
+objLink :: Parser InlineElement
+objLink = do try (string "[[[")
+             page <- many1 (noneOf "|]")
+             text <- option Nothing
+                     (char '|' >> many1 (satisfy (/= ']')) >>= return . Just)
+             string "]]]"
+             return $ ObjectLink page text
+          <?>
+          "object link"
+
+
 pageLink :: Parser InlineElement
 pageLink = do try (string "[[")
               page     <- option Nothing