packages feed

markdown-pap 0.0.1.0 → 0.0.1.1

raw patch · 3 files changed

+18/−23 lines, 3 files

Files

markdown-pap.cabal view
@@ -2,7 +2,7 @@ cabal-version:	>= 1.8  name:		markdown-pap-version:	0.0.1.0+version:	0.0.1.1 stability:	Experimental author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp> maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>@@ -28,7 +28,7 @@ source-repository	this   type:		git   location:	git://github.com/YoshikuniJujo/markdown-pap.git-  tag:		0.0.1.0+  tag:		0.0.1.1  library   hs-source-dirs:	src
src/Text/Markdown/Pap/Parser.hs view
@@ -51,7 +51,8 @@  markdown1 :: Text 	= h:header				{ return h }-	/ l:list				{ return $ List l }+	/ l:link				{ return l }+	/ l:list '\n'*				{ return $ List l } 	/ c:code				{ return $ Code c } 	/ p:paras				{ return $ Paras p } @@ -86,14 +87,6 @@ 	= ' ' ' ' ' ' ' '  list :: List = _:cnt _:dmmy[deeper] l:list1 ls:list1'* _:shllw	{ return $ l : ls }---	= _:cnt _:dmmy[deeper] l:list1 -- ls:list1'* _:shllw---						{ return $ l : ls }-{--	= ls:(_:listHead ' ' l:line '\n' s:subList { return $ BulItem l s })+-						{ return ls }-	/ ls:(_:nListHead ' ' l:line '\n' s:subList { return $ OrdItem l s })+-						{ return ls }-						-}  cnt :: () = _:dmmy[reset] _:(' ' { count })* @@ -106,13 +99,6 @@ 	/ _:nListHead ' ' l:line '\n' ls:list? 		{ return $ OrdItem l $ fromMaybe [] ls } -subList :: List-	= ls:subList1*				{ return ls }--subList1 :: List1-	= _:fourSpaces _:listHead ' ' l:line '\n'	{ return $ BulItem l [] }-	/ _:fourSpaces _:nListHead ' ' l:line '\n'	{ return $ OrdItem l [] }- listHead :: () 	= '*' / '-' / '+' @@ -132,5 +118,8 @@ 	/ !_:list  dmmy :: () =++link :: Text+	= '[' t:<(/= ']')>+ ']'	'(' a:<(/= ')')>+ ')' { return $ Link t a "" }  |]
src/Text/Markdown/Pap/Text.hs view
@@ -1,15 +1,21 @@-module Text.Markdown.Pap.Text (Text(..), List, List1(..)) where--import Control.Applicative ((<$>))-import Data.Maybe-import Data.List+module Text.Markdown.Pap.Text (+	Text(..), List, List1(..), Address, Title) where  data Text 	= Header Int String 	| Paras [String] 	| Code String 	| List List+	| Link String Address Title 	deriving Show +-- type TextString = [TextString1]+-- data TextString1 = Str String | Link String Address Title deriving Show+-- or+-- data TextString1 = Str String | Text Text deriving Show+ type List = [List1] data List1 = OrdItem String List | BulItem String List deriving Show++type Address = String+type Title = String