That seems reasonable. Although, tbh, I'm surprised that this ever worked at all. Looking at the old code it seems like it shouldn't. I'll take a look. Am 31. Oktober 2021 18:43:30 MEZ schrieb John MacFarlane : > >Perhaps for backwards compatibility we should fix things >so that Str with no argument is treated as an empty string? > >John MacFarlane writes: > >> I can confirm that using pandoc.Str('') instead of pandoc.Str() >> works. >> >> >> Albert Krewinkel writes: >> >>> Can't test right now, but can you try to pass an empty string to pandoc.Str('')? >>> >>> Am 31. Oktober 2021 14:18:16 MEZ schrieb Philipp : >>>>Hello everyone, >>>> >>>>I'm experiencing a problem with a self-written Lua-filter after upgrading >>>>to 2.15. >>>> >>>>The filter ran (and still runs) fine with older versions of pandoc, but >>>>with 2.15 I get the following error: >>>> >>>>PandocLuaError "Error during function call:\n\tstring expected, got >>>>string\n\twhile retrieving function argument string\n\twhile retrieving >>>>arguments for function Str\nstack traceback:\n\t[C]: in field >>>>'Str'\n\tscripts/klausur.lua:11: in function >>>>\n\t[C]: in ?\n\t[C]: in field >>>>'walk_block'\n\tscripts/klausur.lua:8: in function 'processheader'" >>>> >>>>stack traceback: >>>> >>>>[C]: in field 'walk_block' >>>> >>>>scripts/klausur.lua:8: in function 'processheader' >>>>The corresponding Lua code looks like this (I hope the formatting is >>>>preserved): >>>> >>>> 7 function processheader(elem) >>>> 8 return pandoc.walk_block(elem, { >>>> 9 Str = function(elem) >>>>10 if string.match(elem.text, "%%%d+p%%") ~= nil then >>>>11 return pandoc.Str() >>>>12 end >>>>13 end >>>>14 }) >>>>15 end >>>> >>>>I'd be thankful for any suggestion what is going wrong here. >>>> >>>>Kind regards, >>>>Philipp >>>> >>>> >>>>-- >>>>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/7c1cf170-c5cb-4203-a4ba-36407f0ebfecn%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/DDB22D9A-22FC-48BB-B1D0-18B059FD92D7%40zeitkraut.de. > >-- >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/m2ee81ks3h.fsf%40Johns-Air.hsd1.ca.comcast.net. -- 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/7BA44317-17A2-450D-90FD-97F61FCC6129%40zeitkraut.de.