Thanks. Any pointers to lua filters that do something similar?
On Saturday, February 25, 2023 at 10:01:08 AM UTC-5 Julien Dutant wrote:
> Looks feasible. Pandoc converts the first html to:
>
> [ BulletList
> [ [ Plain
> [ ... Inlines ]
> ]
> , [ BulletList
> [ [ Plain
> [ ... Inlines ]
> ]
> , [ Plain
> [ ... Inlines ]
> ]
> ]
> ]
> , [ Plain
> [ Inlines ]
> ]
> ]
> ]
>
> I.e., the sublist is converted to its own list item. So the filter should
> pick up list, check if any item within them consists of a lone sublist, and
> if so, move it to the previous item. (And best, apply the filter
> recursively to that sublist itself.)
>
> On Saturday, February 25, 2023 at 2:26:04 PM UTC JDTS wrote:
>
>> The Apple Notes app produces (via AppleScript) HTML for notes with nested
>> lists structured like:
>>
>>
>>
>> - Level 1 element 1
>>
>>
>>
>> - Level 2 element 1
>>
>> - Level 2 element 2
>>
>>
>>
>> - Level 1 element 2
>>
>>
>>
>> As you can see, the sublist is incorrectly positioned. It should be
>> positioned *within* the Level 1 element 1 item, ala:
>>
>>
>>
>> - Level 1 element 1
>>
>>
>>
>> - Level 2 element 1
>>
>> - Level 2 element 2
>>
>>
>>
>>
>>
>> - Level 1 element 2
>>
>>
>>
>> Is there a straightforward way with Lua filters to fix this at the AST
>> level, for arbitrary-depth sublist nesting?
>>
>
--
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/d030f117-9471-46dd-b730-d1ea81e3b040n%40googlegroups.com.