5812ac0390
If the metadata field is all on one line, we try to interpret it as Inlines, and only try parsing as Blocks if that fails. If it extends over one line (including possibly the `|` or `>` character signaling an indented block), then we parse as Blocks. This was motivated by some German users finding that date: '22. Juin 2017' got parsed as an ordered list. Closes #3755.
23 lines
502 B
Markdown
23 lines
502 B
Markdown
```
|
|
% pandoc -t native -s
|
|
---
|
|
title: 'Titel'
|
|
date: '22. Juni 2017'
|
|
---
|
|
^D
|
|
Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "22.",Space,Str "Juni",Space,Str "2017"]),("title",MetaInlines [Str "Titel"])]})
|
|
[]
|
|
```
|
|
|
|
```
|
|
% pandoc -t native -s
|
|
---
|
|
title: '<div>foo</div>'
|
|
date: |
|
|
22. Juni 2017
|
|
---
|
|
^D
|
|
Pandoc (Meta {unMeta = fromList [("date",MetaBlocks [OrderedList (22,Decimal,Period) [[Plain [Str "Juni",Space,Str "2017"]]]]),("title",MetaBlocks [Div ("",[],[]) [Plain [Str "foo"]]])]})
|
|
[]
|
|
```
|
|
|