X-Git-Url: https://ruin.nu/git/?p=yawbih.git;a=blobdiff_plain;f=Wiki.hs;h=0b9e337da4bd7e50f7ebb266c88ca2d9c7bf6c28;hp=7d337c9f679b3b14ce01e1bf6716864a3390fb6d;hb=6dc23e95f52602a2718045d57c8d3b441c40bbe5;hpb=733b60938d6d41ce0fccb5833b1caa7f1046b9d0 diff --git a/Wiki.hs b/Wiki.hs index 7d337c9..0b9e337 100644 --- a/Wiki.hs +++ b/Wiki.hs @@ -2,7 +2,7 @@ module Wiki ( Backend (getCurrent,getList,get,setCurrent,update) ,PGB ,createPGB - ,Markup (Text, Paragraph, Link) + ,Markup (Text, Paragraph, Link, Bold) ,Document ,wikiParser @@ -31,6 +31,7 @@ class Backend a where data Markup = Text String | Paragraph | Link String String + | Bold [Markup] type Document = [Markup] @@ -66,6 +67,12 @@ pLinkLong = do d <- many1 $ noneOf "]" string "]]" return (Link l d) + +pBold = do + string "'''" + s <- wikiParser + return (Bold s) + pLink = do string "[[" l <- many1 $ noneOf "]"