donpark / html2jade

Converts HTML to Jade template. Not perfect but useful enough for non-daily conversions.
MIT License
1.18k stars 156 forks source link

Pass encoding to readFileSync as a string to maintain backwards compatibility #55

Closed RobbieClarken closed 11 years ago

RobbieClarken commented 11 years ago

html2jade was failing with node v0.8 and earlier due to the encoding being passed to readFileSync as an options object. This commit reverts to passing the encoding as a string to maintain backwards compatibility (this is still supported in v0.10).

Prior to this fix, running html2jade with node v0.8 would log a misleading "unknown encoding" error for any html file. I believe that is what was occurring in issue https://github.com/donpark/html2jade/issues/53.

donpark commented 11 years ago

sounds reasonable. deployed as version 0.4.4. thx