mangini / gdocs2md

Convert a Google Drive Document to the Markdown format, suitable for publishing.
Apache License 2.0
2.66k stars 621 forks source link

Lists have spaces around them #31

Open nomicode opened 9 years ago

nomicode commented 9 years ago

A list usually ends up like this:

1. A

2. B

3. C

Which ends up with weird formatting (<p> elements around the list items) when converting to HTML.

fabriciomurta commented 7 years ago

I've just changed the script (among other things) to also glue together lists. I believe it has more code than necessary, but works for me. It seems only problem happens if a list follows a blank line in google docs (then it gets single line break in the end result).

Here's the gist with the updated code: https://gist.github.com/fabriciomurta/0b8479e61686933dfc852ef9e0d122d7

jackieros commented 6 years ago

Using the Export As Markdown googledocs add-on. Voting +1 on the need to output lists (both ordered & unordered) without spaces.

Any chance that you'll update the google docs add-on?

evbacher commented 6 years ago

Check out gd2md-html, a full-blown Docs add-on inspired by Renato's original here. List processing (and many other things) are much improved. Thanks to Renato for pioneering this conversion work!