neocotic/html.md — pull request #43 by akhoury (2014-01-06 05:22:38+00:00)
Title: added optional window to avoid requiring 'jsdom' everytime

I added an optional `options.window` so I can now `require('jsdom')` and `createWindow()` before hand

kinda like that.

```javascript
var posts = [ .... ]; // a large array of html content posts
var md = require('html-md');
var doc = require('jsdom').jsdom(null, null, {
features: {
FetchExternalResources: false
},
url: window ? window.document.baseURI : "file://" + (process.cwd())
});
var win = doc.createWindow();

for (var i = 0; i < posts.length; i++) {
posts[i].content = md(posts[i].content), {window: win});
}
```
I built and successfully tested locally, but didn't commit build files per your [contribution guide](https://github.com/neocotic/html.md/blob/master/CONTRIBUTING.md#making-changes)
Thanks, great module btw.

closes [issue#42](https://github.com/neocotic/html.md/issues/42)