diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Options.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index c88cee9c4..c9a5e27da 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -55,7 +55,7 @@ data Extension = Ext_footnotes -- ^ Pandoc/PHP/MMD style footnotes | Ext_inline_notes -- ^ Pandoc-style inline notes | Ext_pandoc_title_block -- ^ Pandoc title block - | Ext_yaml_title_block -- ^ YAML metadata block + | Ext_yaml_metadata_block -- ^ YAML metadata block | Ext_mmd_title_block -- ^ Multimarkdown metadata block | Ext_table_captions -- ^ Pandoc-style table captions | Ext_implicit_figures -- ^ A paragraph with just an image is a figure @@ -107,7 +107,7 @@ pandocExtensions = Set.fromList [ Ext_footnotes , Ext_inline_notes , Ext_pandoc_title_block - , Ext_yaml_title_block + , Ext_yaml_metadata_block , Ext_table_captions , Ext_implicit_figures , Ext_simple_tables diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 06e3cfd8b..a3500fbcf 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -227,7 +227,7 @@ pandocTitleBlock = try $ do yamlTitleBlock :: MarkdownParser (F (Pandoc -> Pandoc)) yamlTitleBlock = try $ do - guardEnabled Ext_yaml_title_block + guardEnabled Ext_yaml_metadata_block pos <- getPosition string "---" blankline diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 9c9bfa906..80402a757 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -131,8 +131,8 @@ plainTitleBlock tit auths dat = (hcat (intersperse (text "; ") auths)) <> cr <> dat <> cr -yamlTitleBlock :: Value -> Doc -yamlTitleBlock v = "---" $$ (jsonToYaml v) $$ "..." +yamlMetadataBlock :: Value -> Doc +yamlMetadataBlock v = "---" $$ (jsonToYaml v) $$ "..." jsonToYaml :: Value -> Doc jsonToYaml (Object hashmap) = @@ -174,8 +174,8 @@ pandocToMarkdown opts (Pandoc meta blocks) = do let titleblock = case writerStandalone opts of True | isPlain -> plainTitleBlock title' authors' date' - | isEnabled Ext_yaml_title_block opts -> - yamlTitleBlock metadata + | isEnabled Ext_yaml_metadata_block opts -> + yamlMetadataBlock metadata | isEnabled Ext_pandoc_title_block opts -> pandocTitleBlock title' authors' date' | isEnabled Ext_mmd_title_block opts -> |