Hi John,

I am not very familiar with pandoc. Could you give a code example? 
thanks a lot.
---
Regards,
Jeffrey Zhang


On Fri, Dec 27, 2019 at 4:22 AM John MacFarlane <jgm@berkeley.edu> wrote:

Instead of just concat'ing a bullet with item, you could
try using match/replace to ensure that subsequent lines
of item are indented 2 spaces.

Lei Zhang <zhang.lei.fly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I am try to write a custom lua script to convert markdown syntax to
> tiddlywiki.
>
> I found the BulletList do not work as expected. You can get the code from
> [0]
>
> function BulletList(items)
>   local buffer = {}
>   for _, item in pairs(items) do
>     table.insert(buffer, "* " .. item)
>   end
>   return table.concat(buffer, "\n")
> end
>
> when render the markdown like below
>
> * test
>   * test2
>     * test3
> * test4
> * test5
>
> by using `pandoc -t md2tid.lua test.md`, i got
>
> * test
>
> * test2
>
> * test3
> * test4
> * test5
>
> But what i expected is
>
> * test
> ** test2
> ** test3
> * test4
> * test5
>
> The issue here is that i have no way to know what indent i should use in
> the BulletList function.
>
> any  guys have idea to improve this? thanks a lot.
>
>
> [0] https://github.com/jeffrey4l/pandoc-addons/blob/master/md2tid.lua#L217
>
> --
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e249e0e0-d71e-4476-9d1f-12f7d3f2acf5%40googlegroups.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAATxhGcwEOa7NX23LK-vAPg%3D_rK-2gZW_Z5iQCpRNgO7KcEM-g%40mail.gmail.com.