Thanks a lot! This solves my problem. (I was sure to have tried a list as an argument and switched computers in between. This works on Ubuntu 18.04.) John MacFarlane schrieb am Montag, 14. Dezember 2020 um 18:51:46 UTC+1: > > Should Emph perhaps take a list on inlines as argument? > > Emph([Str(value)]) > > Stephan Boltzmann writes: > > > Which additional diagnostics could I run to pin down the problem with > the > > following filter: > > > > #!/usr/bin/env python > > from pandocfilters import toJSONFilter, Str, Emph > > def change(key, value, format, meta): > > if format == 'odt': > > if key == 'Str' and value == 'and': > > return(Emph(Str(value))) > > if __name__ == "__main__": > > toJSONFilter(change) > > > > Using "pandoc -o text.odt --filter filter.py text.md" gives me the error > > message: > > > > Error running filter filter.py: > > Error in $.blocks[0].c[2].c: expected [a], encountered Object > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/e6346e7e-ab9b-4df9-9bec-88bec98fcd93n%40googlegroups.com > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/15241f4c-5799-4ee7-bb10-81bb2fb4ab8fn%40googlegroups.com.