* Why is Inlines function not applied in walk_block and walk_inline?
@ 2021-04-08 18:40 Bastien DUMONT
2021-04-08 20:14 ` Albert Krewinkel
0 siblings, 1 reply; 3+ messages in thread
From: Bastien DUMONT @ 2021-04-08 18:40 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
I tried to run the following code as a Lua filter with pandoc -t plain -L test.lua <<< 'Two words.'
```lua
message = function()
io.stdout:write("I'm here!\n")
end
Para = function(elem)
return pandoc.walk_block(elem, { Inlines = message })
end
```
It only returns:
Two words.
However, when I replace "Inlines" by "Str", I get:
I'm here!
I'm here!
Two words.
At first I thought that it was because walk_block is applied inside the content of Para, where there is no inlines lists, but with "*Two words.*" as input I get the same result. Is it intentional?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why is Inlines function not applied in walk_block and walk_inline?
2021-04-08 18:40 Why is Inlines function not applied in walk_block and walk_inline? Bastien DUMONT
@ 2021-04-08 20:14 ` Albert Krewinkel
[not found] ` <87mtu8cz5g.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Albert Krewinkel @ 2021-04-08 20:14 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> writes:
> At first I thought that it was because walk_block is applied inside
>the content of Para, where there is no inlines lists, but with "*Two
>words.*" as input I get the same result. Is it intentional?
No, this is an oversight. I didn't update the pandoc.walk_* functions
when we introduced support for Inlines and Blocks filtering.
I'm fixing it now.
--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why is Inlines function not applied in walk_block and walk_inline?
[not found] ` <87mtu8cz5g.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2021-04-08 20:28 ` Bastien DUMONT
0 siblings, 0 replies; 3+ messages in thread
From: Bastien DUMONT @ 2021-04-08 20:28 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
Oh, thanks!
Le Thursday 08 April 2021 à 10:14:03PM, Albert Krewinkel a écrit :
>
> Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> writes:
>
> > At first I thought that it was because walk_block is applied inside
> >the content of Para, where there is no inlines lists, but with "*Two
> >words.*" as input I get the same result. Is it intentional?
>
> No, this is an oversight. I didn't update the pandoc.walk_* functions
> when we introduced support for Inlines and Blocks filtering.
>
> I'm fixing it now.
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87mtu8cz5g.fsf%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/YG9nYd3TPbrgsNJD%40localhost.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-08 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 18:40 Why is Inlines function not applied in walk_block and walk_inline? Bastien DUMONT
2021-04-08 20:14 ` Albert Krewinkel
[not found] ` <87mtu8cz5g.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-04-08 20:28 ` Bastien DUMONT
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).