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

Determine <code> blocks #57

Open ahmetb opened 7 years ago

ahmetb commented 7 years ago

This project is awesome.

It would be even more awesome if it detected monospace fonts (e.g. Courier, Roboto Mono) and produced inline markdown surrounded with single backticks (producing a <code>foo</code>).

This would work if the monospace-styled text is in a paragraph with normal text.

rickyzhang82 commented 6 years ago

Why specific font? Why not just use three three back-ticks like ``` to quote the code block in google doc?

But it seems that original code just eat all the string. I tried to figure it out. But I'm not a Javascript developer. That takes me some time.

popekim commented 6 years ago

courier new font detection logic was in the code, but google script change it is broken. I made a pull request that fixes it.

https://github.com/mangini/gdocs2md/pull/61