diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Textile.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index f2a70612d..3ac7f4efb 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -171,9 +171,14 @@ header :: Parser [Char] ParserState Block header = try $ do char 'h' level <- digitToInt <$> oneOf "123456" - optional attributes >> char '.' >> whitespace + attr <- option "" attributes + let ident = case attr of + '#':xs -> xs + _ -> "" + char '.' + whitespace name <- normalizeSpaces <$> manyTill inline blockBreak - return $ Header level name + return $ Header level (ident,[],[]) name -- | Blockquote of the form "bq. content" blockQuote :: Parser [Char] ParserState Block |