Fantastic, thank you!
On Wed, 5 Feb 2020 at 20:59, John MacFarlane <jgm-TVLZxgkOlNWn+EJxYGL2xA@public.gmane.orgu> wrote:

You could use a lua filter; it would have to replace
list items that consist of a single Para element with
list items that consist of a single Plain element.

This filter will do it:

```

paraToPlain = {
    Para = function(el)
      return pandoc.Plain(el.content)
    end
}

function BulletList(el)
  return pandoc.walk_block(el, paraToPlain)
end

```

Save that as tightenLists.lua and use

--lua-filter tightenLists.lua on your command line.

Clare Sudbery <claresudbery-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi
>
> I am converting from docx to gfm.
>
> My input Word docs contain simple bulleted lists like this:
>
> ·      This is a test top level bullet
>
> o   This is a test nested bullet
>
> ·      This is a test top level bullet
>
> o   This is a test nested bullet
>
> ·      This is a test top level bullet
>
> o   This is a test nested bullet
>
> My output markdown docs contain blank lines between every bullet point like
> this:
>   - This is a test top level bullet
>     
>       - This is a test nested bullet
>
>   - This is a test top level bullet
>     
>       - This is a test nested bullet
>
>   - This is a test top level bullet
>     
>       - This is a test nested bullet
>
>
> I have tried using the various docx extensions available but none of them
> seem relevant to this issue.
>
> Here is a sample pandoc command:
> pandoc -t gfm -o "/path/file.md" "/path/file.docx"
>
> Is there any way I can avoid this effect, or do I have to remove the
> resulting blank lines myself?
>
> Cheers
> Clare.
>
> --
> 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/b8f1db8f-2905-45ea-bea6-7cced40456f7%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/CAJePrFq_%3DWS1d%2BmbdVLGLFMsTq%2BVoxOFTCoqgPsCA0pL3oaLHQ%40mail.gmail.com.