That makes sense, thanks. Since the behaviour is fine I suspect the simplest thing for me will be to specify Pandoc < 2.10 in my cabal file

On Thursday, 13 May 2021 at 13:31:00 UTC+1 Albert Krewinkel wrote:
We aim to stay close to the Emacs reference implementation, and the new
behavior is consistent with that of Org mode exporters as of org-version
9.4. The changelog for pandoc 2.10 has this info:

+ The behavior of the `#+AUTHOR` and `#+KEYWORD` export
settings has changed: Org now allows multiple such lines
and adds a space between the contents of each line. Pandoc
now always parses these settings as meta inlines; setting
values are no longer treated as comma-separated lists.
Note that a Lua filter can be used to restore the previous
behavior.

Here's a sample Lua filter to restore the old behavior (untested):


--- Split a string on the given separator char.
local function split_string (str, sep)
local acc = pandoc.List()
for substr in str:gmatch('([^' .. sep .. ']*)') do
acc:insert(tostring(substr))
end
return acc
end

function Meta (meta)
meta.author = split_string(pandoc.utils.stringify(meta.author,','))
return meta
end

See https://pandoc.org/lua-filters.html for more details.

HTH,
Albert

Garry Cairns <garryj...@gmail.com> writes:

> tl;dr
> I'd expect KEYWORDS and AUTHOR to be parsed as MetaList types. But it seems
> they are individual strings/MetaInlines. Am I just misunderstanding the
> intent?
>
> Background
> I've used Slick as a static site generator for a little while
> (https://ilikewhenitworks.gitlab.io/). I don't post very often, and when I
> tried to write a post recently a rebuild of the code showed it no longer
> worked. I should be able to fix my personal issue by downgrading versions,
> but the root of the problem seems generally applicable. Given an org-mode
> file with headers:
>
> #+TITLE: Org Mode in Hakyll
> #+AUTHOR: Garry Cairns, Someone Else
> #+DATE: 2019-03-17
> #+KEYWORDS: emacs, haskell
> #+STARTUP: showall
>
> I'd expect KEYWORDS and AUTHOR to be parsed as MetaList types. But it seems
> they are individual strings both from how my static site builder now fails
> with an expected Array got String error, and from the following output:
>
> [nix-shell:~/code/ILikeWhenItWorks]$ pandoc -s -t native
> posts/2019-03-17-org-test.org
> Pandoc (Meta {unMeta = fromList [("author",MetaInlines [Str
> "Garry",Space,Str "Cairns,",Space,Str "Someone",Space,Str
> "Else"]),("date",MetaInlines [Str "2019-03-17"]),("keywords",MetaInlines
> [Str "emacs,",Space,Str "haskell"]),("title",MetaInlines [Str
> "Org",Space,Str "Mode",Space,Str "in",Space,Str "Hakyll"])]})
>
> This is with
>
> [nix-shell:~/code/ILikeWhenItWorks]$ pandoc --version
> pandoc 2.10.1
> Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
>
> Am I misunderstanding here?


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7266c668-28b9-4021-839f-19b4a34f5745n%40googlegroups.com.