pandoc.utils.type() return values seem to be a little inconsistent. For example, it can return: - 'List' ... for pandoc.List (note: logging.lua leaves this alone) - 'pandoc Xxx' ... for pandoc.Row etc. (note: logging.lua replaces the space with a dot) - 'HsLua.JSON.array' ... presumably for arrays that have come via a JSON library I was toying with not indicating HsLua.JSON.array (i.e., showing it like any other table) but perhaps it's better just to report things as they are. Can any other HsLua.JSON.xxx values be returned, e.g., why not HsLua.JSON.object or indeed HsLua.JSON.{boolean,number,string,null}? On Fri, 20 Jan 2023 at 16:33, William Lupton wrote: > Update: Until today, logging.lua assumed that pairs() would work on all > userdata. Option 2 (my favourite) should work well if there are ever any > other types of userdata (not sure whether there ever will be). > > On Fri, 20 Jan 2023 at 16:29, William Lupton > wrote: > >> Thanks Albert. I expect I'll raise an issue. I assume that this is the >> only use of light userdata? >> >> Looking more closely (why didn't I do this before?) I see that tostring() >> returns 'userdata: 0x0' for these values, so I think it makes sense to >> report them as one of: >> >> - Whatever tostring() returns >> - As above with the leading 'userdata: ' removed >> <--- probably my favourite >> - As above with '0x0' reported as 'nil' (not sure about this) >> >> >> On Fri, 20 Jan 2023 at 16:05, ChrisD wrote: >> >>> On 1/20/2023 2:54 AM, 'William Lupton' via pandoc-discuss wrote: >>> > I investigated, and parts of the writer options are "light userdata" >>> (I hadn't heard of that). I've committed and merged a fix that will report >>> such items as "". You can now list most of the writer options >>> (just a few colors show as ). >>> >>> Your update works well. (I didn't know about light userdata either.) >>> Thanks! >>> >>> -- >>> 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/fbca8e05-fed7-39e1-08f0-0498c399f33f%40intielectronics.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/CAEe_xxjkBZfgeh5jDbZNDNrFbG4SKTA0S9qjzaEXgxTr5BZVNw%40mail.gmail.com.