Here are my tests for issue #59, "Another nested object problem"
Test case for flatiron/plates#59
@flatiron/plates#59 - Do a better job at balancing tags when processi…
Cleanup, comment. Other tests ignore whitespace, I guess I will, too.
An additional test
Thanks for the fix!
After using plates for quite some time I got the same bug you described in issue #59
It's pretty easy to get caught by this one, still don't understand how I didn't manage to trigger it before!
The main problem here is that we're trying to parse HTML by using regular expressions (http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags)
I'm not sure how much having a proper xml parser would impact speed, but using regex is quite bug prone in my book.
Hope this get merged up!
Yeah, even though I came up with a patch that worked for me (never did get around to making an updated pull request, though), I wasn't 100% happy with it. It seems brittle, and I keep thinking there's some other edge-case lurking in there. Glad if it helped you, though.
have you run this through benchmarkjs or something similar? this looks good and i'd like to pull it in, but I'd like to be sure it doesnt incur exponential overhead with the regexp creation and execution.
No, I haven't benchmarked it, and I didn't think about the regex creation being looped. Also, I think I made additional changes on my fork after I made that pull request. I'll try to find time this weekend to give it another look and hopefully submit an updated pull request.
Thanks for taking a look!
The idea is really good, just needs some minor refinement ;) Thanks!!
Thank you for your contribution, but closing this due to age. This project is formally deprecated. Will be adding a notice soon.