diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-03 22:56:29 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-03 23:10:52 -0800 |
commit | d4e512776d9e38ef613167dd48fda17104ff25d9 (patch) | |
tree | ff9593db4e9140299e11aa84494eb350cea27b03 /src/Text/Pandoc/Readers | |
parent | 4bf9d362d22fcd7b51da7bd14a6a5b63533706c6 (diff) | |
download | pandoc-d4e512776d9e38ef613167dd48fda17104ff25d9.tar.gz |
Textile reader: added hrule parser.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index f64c9e416..c2b92b75b 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -106,6 +106,7 @@ blockParsers :: [GenParser Char ParserState Block] blockParsers = [ codeBlock , header , blockQuote + , hrule , anyList , rawHtmlBlock' , maybeExplicitBlock "table" table @@ -151,6 +152,18 @@ blockQuote = try $ do whitespace para >>= return . BlockQuote . (:[]) +-- Horizontal rule + +hrule :: GenParser Char st Block +hrule = try $ do + skipSpaces + start <- oneOf "-*" + count 2 (skipSpaces >> char start) + skipMany (spaceChar <|> char start) + newline + optional blanklines + return HorizontalRule + -- Lists handling -- | Can be a bullet list or an ordered list. This implementation is |