Skip to content

Can I assume that pandoc-api-version always appears first? #3211

@sergiocorreia

Description

@sergiocorreia

On my system (and on the TravisCI systems), Pandoc outputs a predictable JSON:

>>> echo a | pandoc --to=json
{"pandoc-api-version":[1,17,0,4],"meta":{},"blocks":[{"t":"Para","c":[{"t":"Str","c":"a"}]}]}

However, I've got some reports * that this is not always the case:

>>> cat pftest.md | pandoc -t json
{"blocks":[{"t":"Para","c" ...

In both cases we had the latest Pandoc version:

    pandoc 1.18
    Compiled with pandoc-types 1.17.0.4, texmath 0.8.6.6, highlighting-kate 0.6.3

Is this a bug, or is there no guarantee about the order of the elements in a map? I monkey-patched panflute to work around different orders at the first level, but doing the same for all the "t" and "c" items would be a bit messy..

Thanks,
S

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions