public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Lua filter broken after upgrade to 2.15 (macOS)
@ 2021-10-31 13:18 Philipp
       [not found] ` <7c1cf170-c5cb-4203-a4ba-36407f0ebfecn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Philipp @ 2021-10-31 13:18 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1525 bytes --]

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 
<scripts/klausur.lua:9>\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.

[-- Attachment #1.2: Type: text/html, Size: 2689 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-02  7:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31 13:18 Lua filter broken after upgrade to 2.15 (macOS) Philipp
     [not found] ` <7c1cf170-c5cb-4203-a4ba-36407f0ebfecn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-10-31 15:11   ` Albert Krewinkel
     [not found]     ` <DDB22D9A-22FC-48BB-B1D0-18B059FD92D7-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-10-31 17:42       ` John MacFarlane
     [not found]         ` <m2h7cxks4v.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-10-31 17:43           ` John MacFarlane
     [not found]             ` <m2ee81ks3h.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-10-31 18:22               ` Albert Krewinkel
     [not found]                 ` <7BA44317-17A2-450D-90FD-97F61FCC6129-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-10-31 19:04                   ` Albert Krewinkel
     [not found]                     ` <020C1DFA-141A-4AF6-83FD-87D400A65090-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-10-31 20:12                       ` John MacFarlane
2021-11-01 11:25   ` Albert Krewinkel
     [not found]     ` <87fssg6rsp.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-11-01 15:26       ` Philipp
     [not found]         ` <0e68ba01-4ebe-47c1-a7fd-3049b41b2785n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-11-02  7:41           ` Albert Krewinkel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).