diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-23 08:59:35 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-23 08:59:35 -0800 |
commit | 628a1ef81548ccf0307276b4f9164191cacc9193 (patch) | |
tree | 47d1e3a37bdd6d9555b2988f8e273d6fbc94fa6e /src/Text | |
parent | 7234a79104ab8cf8358bdab153d5eefbcefc2e9a (diff) | |
download | pandoc-628a1ef81548ccf0307276b4f9164191cacc9193.tar.gz |
Textile reader: Fixed bug (swallowed p at beginning of paragraph).
The problem was a missing 'try' in the maybeExplicitBlock parser.
Test case, a paragraph beginning with 'p', has been added.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index f9007d77c..4221754cc 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -340,10 +340,10 @@ table = try $ do -- | Blocks like 'p' and 'table' do not need explicit block tag. -- However, they can be used to set HTML/CSS attributes when needed. maybeExplicitBlock :: String -- ^ block tag name - -> GenParser Char ParserState Block -- ^ implicit block - -> GenParser Char ParserState Block + -> GenParser Char ParserState Block -- ^ implicit block + -> GenParser Char ParserState Block maybeExplicitBlock name blk = try $ do - optional $ string name >> optional attributes >> char '.' >> + optional $ try $ string name >> optional attributes >> char '.' >> ((try whitespace) <|> endline) blk |