aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-09-01 09:22:55 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-09-01 09:22:55 -0700
commit90c49b0aaed34ef1efb8e342d80f93cb477512a7 (patch)
tree23d74aaf96d709e00b17c36f12755a1e07f9bfe9 /src/Text/Pandoc
parent9282f632786e85c7a31f974f20162214c5387c00 (diff)
downloadpandoc-90c49b0aaed34ef1efb8e342d80f93cb477512a7.tar.gz
Use registerHeader in Textile reader.
This produces automatic header identifiers, unless `auto_identifiers` extension is disabled. Closes #967.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 8ccd1e227..23e07f621 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -52,6 +52,7 @@ TODO : refactor common patterns across readers :
module Text.Pandoc.Readers.Textile ( readTextile) where
import Text.Pandoc.Definition
+import qualified Text.Pandoc.Builder as B
import Text.Pandoc.Shared
import Text.Pandoc.Options
import Text.Pandoc.Parsing
@@ -179,7 +180,8 @@ header = try $ do
char '.'
whitespace
name <- normalizeSpaces <$> manyTill inline blockBreak
- return $ Header level attr name
+ attr' <- registerHeader attr (B.fromList name)
+ return $ Header level attr' name
-- | Blockquote of the form "bq. content"
blockQuote :: Parser [Char] ParserState Block