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.