danielgtaylor/aglio — pull request #19 by dberesford (2014-02-10 19:17:44+00:00)
Title: Fix for render() being called with node.js buffer instead of string

hi,

attempts to fix render() being called with a node.js buffer object instead of a string, which results in the following error:

$ aglio -i README.md -o output.html

/usr/local/lib/node_modules/aglio/lib/main.js:79
filteredInput = !options.filterInput ? input : input.replace(/\r\n?/g, '\n
^
TypeError: Object FORMAT: 1A

# SalesForce Connector API

The Salesforce FeedHenry Connector API.

# SalesForce Connector API Root [/]

SalesForce API entry point.

This resource does not have any attributes. Instead it offers the initial API affordances in the form of the HTTP Link header and HAL links.

## Retrieve Entry Point [GET]

+ Response 200 (application/hal+json)
+ Headers

Link: ;rel="self",;rel="gists"

+ Body

{
"_links": {
"self": { "href": "/" },
"gists": { "href": "/gists?{since}", "templated": true }
}
} has no method 'replace'
at Object.exports.render (/usr/local/lib/node_modules/aglio/lib/main.js:79:58)
at exports.renderFile (/usr/local/lib/node_modules/aglio/lib/main.js:121:22)
at fs.readFile (fs.js:176:14)
at Object.oncomplete (fs.js:297:15)