Child tags not correctly closed
- Dominant language
- Python
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
During my internal testing, it seems to fail when "html":"[]" contains more than 2 elements... :thinking:
```bash
Received:
string(190) "{"<>":"div","class":"${class}", "id":"${id}","html":[{"<>":"img", "src":"${src}","alt":"${alt}"},{"<>":"p","text":"Hi ${name}! Welcome to json2html!"},{"<>":"p","text":"Awesome it works!"}]}"
string(150) "[{"class":"card"}, {"id":"5d09870071631"}, {"src":"https://picsum.photos/id/557/400?random=5d09870071676"}, {"alt":"this is our logo"}, {"name":"Jo"}]"
Converted:
string(190) "
Hi Jo! Welcome to json2html!
Awesome it works!
```
First child is correct (self closing tag):
```html
```
Second child is added but mixed with the third child:
```html
Hi Jo! Welcome to json2html!
Awesome it works!
```
Then the closing tag code is executed:
```html
```
> I think the issue is related to this part (closing tag)
Complete `HTML` output:
```html
Hi Jo! Welcome to json2html!
Awesome it works!
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.