Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursive include not working #38

Open
Sau64 opened this issue Sep 22, 2019 · 0 comments
Open

recursive include not working #38

Sau64 opened this issue Sep 22, 2019 · 0 comments
Labels

Comments

@Sau64
Copy link

Sau64 commented Sep 22, 2019

I have the following error when trying to do a recursive include in a menu template.
This does work with the other jsmart in github but that one is way older. - https://github.com/miroshnikov/jsmart

Uncaught (in promise) SyntaxError: Invalid regular expression: /^\s*(/foreach)\s*$/: Stack overflow
    at String.match (<anonymous>)
    at Object.findTag (jsmart.js:283)
    at Object.findCloseTag (jsmart.js:329)
    at Object.parse (jsmart.js:199)
    at Object.getTree (jsmart.js:130)
    at Object.loadTemplate (jsmart.js:715)
    at Object.parse (jsmart.js:1209)
    at Object.parse (jsmart.js:211)
    at Object.parse (jsmart.js:1267)
    at Object.parse (jsmart.js:200)
 <script  id="category-tree" type="text/html"> 
 		{foreach $data as $cat}
 		<li><a href="#">{$cat.category_name}</a>
 			{if $cat.nodes}
 			<ul>
 				{include file='category-tree' data=$cat.nodes}
 			</ul>
 			{/if}
 		</li>
 		{/foreach}
 	</script>
@umakantp umakantp added the bug label May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants