wanasit/enml-js — pull request #8 by netlovers (2013-12-02 18:20:50+00:00)
Title: Fix the TODO parser

The last TODO elem was almost always left out from the returned value for simple use cases.

Try the code out with this:
```
console.log(enml.TodosOfENML(''
+ ''
+ ''
+ ''
+ '

Some stuff

'
+ '

first todo elem

'
+ '

second todo elem

'
+ '

third todo elem

'
+ ''
));
```

The original code left out the "third todo elem", because basically it was the last elemen, and there were no code to push it into the returned values.
I made a quick fix. And sorry to say but I think this codebase could use a rewrite, because it looks like it was put together in a hurry. :\