BlackPepperSoftware / thymeleaf-fragment.js

Process Thymeleaf fragments in the browser.
Apache License 2.0
8 stars 3 forks source link

Fix #2 #6

Closed lknop closed 7 years ago

lknop commented 8 years ago

This PR fixes #2 adding support for nested fragments in the templates

markhobson commented 7 years ago

Thanks for the PR. Could you also add a test for nested fragments please?

lknop commented 7 years ago

Sure, that's a good idea. I also have a fix to break out of recursion when there are mistakes in the definitions, I'll add that too.

lknop commented 7 years ago

I set the maximum level of nesting to 5. Unfortunately I needed to add a browser.wait in the test since sometimes the browser did manage to load all the content but sometimes it did not, waiting makes it 100% reliable.

markhobson commented 7 years ago

Thanks for this PR @lknop and apologies for the delay in getting around to looking at it. I've pushed back a slightly different implementation based on your submission:

Let me know if you encounter any problems with this implementation.