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

Treat consolas font as monospaced/backticked text as well. #55

Open avengerx opened 7 years ago

avengerx commented 7 years ago

Hi, I found the Consolas font "cuter" in my google docs and I am using this change to lines 267-268 of the script:

     if (!inSrc && (font===font.COURIER_NEW || font=="Consolas")) {
        while (i>=1 && txt.getFontFamily(attrs[i-1]) && (txt.getFontFamily(attrs[i-1])===font.COURIER_NEW || txt.getFontFamily(attrs[i-1])=="Consolas")) {

I'm not keen enough to guess what constant is from font.* that will match the Consolas font, but this way works for me. :)

(sorry I am too lazy to make a proper/decent pull request, so the alternative is here for whoever wants to implement to the code)