2018-09-15 12:09:13 +02:00
|
|
|
```
|
|
|
|
% pandoc -s -t native
|
|
|
|
---
|
|
|
|
foobar_: this should be ignored
|
|
|
|
foo:
|
|
|
|
bar_: as should this
|
|
|
|
---
|
|
|
|
^D
|
2021-09-19 12:09:51 -07:00
|
|
|
Pandoc
|
2021-09-28 21:17:53 -07:00
|
|
|
Meta
|
|
|
|
{ unMeta = fromList [ ( "foo" , MetaMap (fromList []) ) ] }
|
|
|
|
[]
|
2018-09-15 12:09:13 +02:00
|
|
|
```
|
|
|
|
```
|
|
|
|
% pandoc -s -t native
|
|
|
|
---
|
|
|
|
# For precedence, see multiple-metadata-blocks.md and vars-and-metadata.md
|
|
|
|
# For Bools, see also 4819.md
|
|
|
|
# For Multiline strings, see yaml-with-chomp.md
|
|
|
|
int: 7
|
|
|
|
float: 1.5
|
|
|
|
scientific: 3.7e-5
|
|
|
|
bool: true
|
|
|
|
more: False
|
|
|
|
nothing: null
|
2020-10-14 21:32:51 +02:00
|
|
|
empty: []
|
2018-09-15 12:09:13 +02:00
|
|
|
nested:
|
|
|
|
int: 8
|
|
|
|
float: 2.5
|
|
|
|
bool: true
|
|
|
|
more: False
|
|
|
|
nothing: null
|
2020-10-14 21:32:51 +02:00
|
|
|
empty: []
|
2018-09-15 12:09:13 +02:00
|
|
|
scientific: 3.7e-5
|
|
|
|
---
|
|
|
|
^D
|
2021-09-19 12:09:51 -07:00
|
|
|
Pandoc
|
2021-09-28 21:17:53 -07:00
|
|
|
Meta
|
|
|
|
{ unMeta =
|
|
|
|
fromList
|
|
|
|
[ ( "bool" , MetaBool True )
|
|
|
|
, ( "empty" , MetaList [] )
|
|
|
|
, ( "float" , MetaInlines [ Str "1.5" ] )
|
|
|
|
, ( "int" , MetaInlines [ Str "7" ] )
|
|
|
|
, ( "more" , MetaBool False )
|
|
|
|
, ( "nested"
|
|
|
|
, MetaMap
|
|
|
|
(fromList
|
|
|
|
[ ( "bool" , MetaBool True )
|
|
|
|
, ( "empty" , MetaList [] )
|
|
|
|
, ( "float" , MetaInlines [ Str "2.5" ] )
|
|
|
|
, ( "int" , MetaInlines [ Str "8" ] )
|
|
|
|
, ( "more" , MetaBool False )
|
|
|
|
, ( "nothing" , MetaInlines [ Str "null" ] )
|
|
|
|
, ( "scientific" , MetaInlines [ Str "3.7e-5" ] )
|
|
|
|
])
|
|
|
|
)
|
|
|
|
, ( "nothing" , MetaInlines [ Str "null" ] )
|
|
|
|
, ( "scientific" , MetaInlines [ Str "3.7e-5" ] )
|
|
|
|
]
|
2021-09-19 12:09:51 -07:00
|
|
|
}
|
2021-09-28 21:17:53 -07:00
|
|
|
[]
|
2018-09-15 12:09:13 +02:00
|
|
|
```
|
|
|
|
```
|
|
|
|
% pandoc -s -t native
|
|
|
|
---
|
|
|
|
array:
|
|
|
|
- foo: bar
|
|
|
|
- bool: True
|
|
|
|
---
|
|
|
|
^D
|
2021-09-19 12:09:51 -07:00
|
|
|
Pandoc
|
2021-09-28 21:17:53 -07:00
|
|
|
Meta
|
|
|
|
{ unMeta =
|
|
|
|
fromList
|
|
|
|
[ ( "array"
|
|
|
|
, MetaList
|
|
|
|
[ MetaMap
|
|
|
|
(fromList [ ( "foo" , MetaInlines [ Str "bar" ] ) ])
|
|
|
|
, MetaMap (fromList [ ( "bool" , MetaBool True ) ])
|
|
|
|
]
|
|
|
|
)
|
2021-09-19 12:09:51 -07:00
|
|
|
]
|
|
|
|
}
|
2021-09-28 21:17:53 -07:00
|
|
|
[]
|
2018-09-15 12:09:13 +02:00
|
|
|
```
|
2018-09-15 16:47:53 +02:00
|
|
|
```
|
|
|
|
% pandoc -s -t native --metadata-file command/yaml-metadata.yaml
|
|
|
|
---
|
|
|
|
title: document
|
|
|
|
---
|
|
|
|
^D
|
2021-09-19 12:09:51 -07:00
|
|
|
Pandoc
|
2021-09-28 21:17:53 -07:00
|
|
|
Meta
|
|
|
|
{ unMeta =
|
|
|
|
fromList
|
|
|
|
[ ( "other"
|
|
|
|
, MetaInlines
|
|
|
|
[ Emph [ Str "markdown" ] , Space , Str "value" ]
|
|
|
|
)
|
|
|
|
, ( "title" , MetaInlines [ Str "document" ] )
|
|
|
|
]
|
2021-09-19 12:09:51 -07:00
|
|
|
}
|
2021-09-28 21:17:53 -07:00
|
|
|
[]
|
2018-09-15 16:47:53 +02:00
|
|
|
```
|
|
|
|
```
|
|
|
|
% pandoc -s -t native --metadata-file command/yaml-metadata.yaml -M title=cmdline
|
|
|
|
^D
|
2021-09-19 12:09:51 -07:00
|
|
|
Pandoc
|
2021-09-28 21:17:53 -07:00
|
|
|
Meta
|
|
|
|
{ unMeta =
|
|
|
|
fromList
|
|
|
|
[ ( "other"
|
|
|
|
, MetaInlines
|
|
|
|
[ Emph [ Str "markdown" ] , Space , Str "value" ]
|
|
|
|
)
|
|
|
|
, ( "title" , MetaString "cmdline" )
|
|
|
|
]
|
2021-09-19 12:09:51 -07:00
|
|
|
}
|
2021-09-28 21:17:53 -07:00
|
|
|
[]
|
2018-09-15 16:47:53 +02:00
|
|
|
```
|