git.iko.soy/typeable/pandoc
on master help sign in
Textile reader: Fixed bug (swallowed p at beginning of paragraph).
628a1efJohn MacFarlane
src/Text/Pandoc/Readers/Textile.hs+3−3
@@ -340,10 +340,10 @@ table = try $ do
340-- | Blocks like 'p' and 'table' do not need explicit block tag.
340-- | Blocks like 'p' and 'table' do not need explicit block tag.
341-- However, they can be used to set HTML/CSS attributes when needed.
341-- However, they can be used to set HTML/CSS attributes when needed.
342maybeExplicitBlock :: String -- ^ block tag name
342maybeExplicitBlock :: String -- ^ block tag name
343− -> GenParser Char ParserState Block -- ^ implicit block
343+ -> GenParser Char ParserState Block -- ^ implicit block
344− -> GenParser Char ParserState Block
344+ -> GenParser Char ParserState Block
345maybeExplicitBlock name blk = try $ do
345maybeExplicitBlock name blk = try $ do
346− optional $ string name >> optional attributes >> char '.' >>
346+ optional $ try $ string name >> optional attributes >> char '.' >>
347 ((try whitespace) <|> endline)
347 ((try whitespace) <|> endline)
348 blk
348 blk
349
349
tests/textile-reader.native+1
@@ -15,6 +15,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
15 [[Plain [Str "criminey",Str "."]]]
15 [[Plain [Str "criminey",Str "."]]]
16,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"]
16,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"]
17,Para [Str "and",Space,Str "here",Str "."]
17,Para [Str "and",Space,Str "here",Str "."]
18+,Para [Str "pandoc",Space,Str "converts",Space,Str "textile",Str "."]
18,Header 1 [Str "Block",Space,Str "Quotes"]
19,Header 1 [Str "Block",Space,Str "Quotes"]
19,BlockQuote
20,BlockQuote
20 [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "famous",Space,Str "quote",Space,Str "from",Space,Str "somebody",Str ".",Space,Str "He",Space,Str "had",Space,Str "a",Space,Str "lot",Space,Str "of",Space,Str "things",Space,Str "to",LineBreak,Str "say",Str ",",Space,Str "so",Space,Str "the",Space,Str "text",Space,Str "is",Space,Str "really",Space,Str "really",Space,Str "long",Space,Str "and",Space,Str "spans",Space,Str "on",Space,Str "multiple",Space,Str "lines",Str "."]]
21 [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "famous",Space,Str "quote",Space,Str "from",Space,Str "somebody",Str ".",Space,Str "He",Space,Str "had",Space,Str "a",Space,Str "lot",Space,Str "of",Space,Str "things",Space,Str "to",LineBreak,Str "say",Str ",",Space,Str "so",Space,Str "the",Space,Str "text",Space,Str "is",Space,Str "really",Space,Str "really",Space,Str "long",Space,Str "and",Space,Str "spans",Space,Str "on",Space,Str "multiple",Space,Str "lines",Str "."]]
tests/textile-reader.textile+2
@@ -33,6 +33,8 @@ There should be a paragraph break between here
33
33
34and here.
34and here.
35
35
36+pandoc converts textile.
37+
36h1. Block Quotes
38h1. Block Quotes
37
39
38bq. This is a famous quote from somebody. He had a lot of things to
40bq. This is a famous quote from somebody. He had a lot of things to