public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How to deal with nested divs in lua filter
@ 2020-10-28  6:28 jiewuza
  2020-10-28  9:28 ` jiewuza
       [not found] ` <m2a6w6zwxu.fsf-9Onoh4P/yGk@public.gmane.org>
  0 siblings, 2 replies; 8+ messages in thread
From: jiewuza @ 2020-10-28  6:28 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


I have nested divs in my document.
I have in my lua filter:

```
function handleDiv(el)
    if el.classes:includes("parent") then
       return handleChild(el.content)     ----- here content is {}
    end
    return {}
end
```

But I find the content of the parent div is empty. And it seems that
each child div triggers `handleDiv` before the parent does.

What I want is to deal with the child divs only in `handleChild` without
triggering `handleDiv`.

Is there any suggestions?


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

end of thread, other threads:[~2020-10-30 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28  6:28 How to deal with nested divs in lua filter jiewuza
2020-10-28  9:28 ` jiewuza
     [not found] ` <m2a6w6zwxu.fsf-9Onoh4P/yGk@public.gmane.org>
2020-10-28 17:22   ` John MacFarlane
2020-10-29  5:57     ` jiewuza
2020-10-29  7:48     ` jiewuza
     [not found]     ` <m2d012uuxk.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-10-30 15:36       ` Albert Krewinkel
     [not found]         ` <87r1pflo9a.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-10-30 16:37           ` John MacFarlane
     [not found]             ` <m2a6w3r7oh.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-10-30 16:50               ` 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).