public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Lua Filter: Detect Type of Inlines
@ 2023-05-12 17:13 ThomasH
       [not found] ` <4d901ab9-179d-4274-8ce9-fdf36056905fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: ThomasH @ 2023-05-12 17:13 UTC (permalink / raw)
  To: pandoc-discuss


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

I want to detect the types of the inline elements of a paragraph. I 
understand there is pandoc.utils.type() that basically does that, but when 
I run

function Para(para)
    for i = 1,#para.content,1 do
        print(tostring(pandoc.utils.type(para.content[i])))
    end
end

all that is printed is "Inline" for all elements, not specific types like 
Str, Span, Link or Image. How can I get at the specific types?

Thanks,
T.

-- 
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/4d901ab9-179d-4274-8ce9-fdf36056905fn%40googlegroups.com.

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

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

end of thread, other threads:[~2023-05-13 10:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12 17:13 Lua Filter: Detect Type of Inlines ThomasH
     [not found] ` <4d901ab9-179d-4274-8ce9-fdf36056905fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-12 17:32   ` Albert Krewinkel
     [not found]     ` <87o7mpqwfd.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-05-13  9:00       ` ThomasH
     [not found]         ` <f31b8b9b-f30e-45c6-91d5-caddb494f5b0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-13 10:56           ` 'William Lupton' via pandoc-discuss

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).