Files
pandoc/test/command/4819.md
T
John MacFarlane 044472d4d9 Use yamlet for YAML parsing.
Pandoc parsed YAML with the yaml package, which depends on the C
library libyaml. It now uses yamlet, a pure Haskell YAML 1.2 parser.
Values still go through the existing aeson instances.

Behavior changes:

- YAML errors show the file, the line and the column, with the
  offending line. In metadata blocks the line is the line in the
  document.
- `yes`, `no`, `on`, `off`, `y` and `n` are strings,
  not booleans, as in YAML 1.2. This restores the behavior before
  the switch from HsYAML.
- Duplicate keys in a mapping are an error. They were a warning.
- .5, .inf and .nan are numbers.

Text.Pandoc.Translations: readTranslations takes the path of the
file, for error messages [API change].
2026-10-13 08:59:17 -07:00

707 B

% pandoc -f markdown -t native -s
---
foo: 42
...
^D
Pandoc
  Meta
    { unMeta = fromList [ ( "foo" , MetaInlines [ Str "42" ] ) ]
    }
  []
% pandoc -f markdown -t native -s
---
foo: true
...
^D
Pandoc
  Meta { unMeta = fromList [ ( "foo" , MetaBool True ) ] } []
% pandoc -f markdown -t native -s
---
foo: True
...
^D
Pandoc
  Meta { unMeta = fromList [ ( "foo" , MetaBool True ) ] } []
% pandoc -f markdown -t native -s
---
foo: FALSE
...
^D
Pandoc
  Meta { unMeta = fromList [ ( "foo" , MetaBool False ) ] }
  []
% pandoc -f markdown -t native -s
---
foo: no
...
^D
Pandoc
  Meta
    { unMeta = fromList [ ( "foo" , MetaInlines [ Str "no" ] ) ]
    }
  []