mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Use MetaInlines not MetaBlocks for multimarkdown metadata fields.
This gives better results in converting to e.g. pandoc markdown. Ref: <https://groups.google.com/d/msgid/pandoc-discuss/9728d1f4-040e-4392-aa04-148f648a8dfdn%40googlegroups.com>
This commit is contained in:
@@ -298,7 +298,7 @@ kvPair allowEmpty = try $ do
|
||||
(try $ newline >> lookAhead (blankline <|> nonspaceChar))
|
||||
guard $ allowEmpty || not (T.null val)
|
||||
let key' = T.concat $ T.words $ T.toLower key
|
||||
let val' = MetaBlocks $ B.toList $ B.plain $ B.text val
|
||||
let val' = MetaInlines $ B.toList $ B.text val
|
||||
return (key',val')
|
||||
|
||||
parseMarkdown :: PandocMonad m => MarkdownParser m Pandoc
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
```
|
||||
% pandoc -f markdown_mmd -t markdown -s
|
||||
Title: Blah blah blah
|
||||
Author: Doo de Doo
|
||||
Base Header Level: 1
|
||||
Bibliography: Pubs.bib
|
||||
Lang: en-GB
|
||||
|
||||
body
|
||||
^D
|
||||
---
|
||||
author: Doo de Doo
|
||||
baseheaderlevel: 1
|
||||
bibliography: Pubs.bib
|
||||
lang: en-GB
|
||||
title: Blah blah blah
|
||||
---
|
||||
|
||||
body
|
||||
```
|
||||
Reference in New Issue
Block a user