dantebronto / picard

A Micro-framework for node.js
216 stars 12 forks source link

haml rendering broken in node v0.1.96 #9

Closed danieldkim closed 14 years ago

danieldkim commented 14 years ago

looks like the issue is that node is now passing a Buffer object to the fs.readFile() callback instead of a string. here's the stack trace:

/usr/local/src/picard/picard/lib/picard/haml.js:364
  var lines = text.split("\n"),
                   ^
TypeError: Object %div= partial('places/ul') has no method 'split'
    at Object. (/usr/local/src/picard/picard/lib/picard/haml.js:364:20)
    at Object.render (/usr/local/src/picard/picard/lib/picard/haml.js:434:25)
    at /usr/local/src/picard/picard/lib/picard/request_extensions.js:189:27
    at fs:81:13
    at node.js:204:9
danieldkim commented 14 years ago

i have a fix for this issue in my fork:

http://github.com/danieldkim/picard/commit/292373daa1556ddba61a4e7e001c46c0cf1ac902

danieldkim commented 14 years ago

fixed committed to master: 3f255bf5023a9a3832bf9f5e8818ce938bce2d4f