skywrite / sky-tumblr-export

Export your Tumblr blog into Markdown. Use it with Sky if you like.
MIT License
59 stars 10 forks source link

Safely handle invalid embed #10

Closed willpracht closed 9 years ago

willpracht commented 9 years ago

If post.player[post.player.length - 1].embed_code === false, set post.body to empty string instead, keeping pandoc from throwing error.

I noticed on a few of my posts that I had false set for all of the embed_code values.

When post.body was passed into pandoc as false, pandoc would throw an error.

This isn't the most elegant solution, admittedly.

jprichardson commented 9 years ago

Thanks!