Thanks! This seems perfect :grin: On Tue, Apr 9, 2019 at 3:29 PM Jesse Rosenthal wrote: > Rohit Goswami writes: > > > I need to convert the following metadata (from the conversion from of an > > org-mode file and its metadata): > > "meta":{"kind":{"t":"MetaString","c":"article"}, > > This lua filter would work: > > ~~~ > function Meta(meta) > local new_meta = {} > for k, v in pairs(meta) do > if type(v) == "string" then > new_meta[k] = pandoc.MetaInlines({pandoc.Str(v)}) > else > new_meta[k] = v > end > end > return new_meta > end > ~~~ > > It matches on "string" instead of MetaString because of the way that > MetaValues are handled in lua filters. > -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAECsBSHV41BE%3DaZ4w3_QYNnv9fSrDp_X-jqiFHMb4JA9%3D7EqAg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.