Log1x / acf-composer

Compose ACF Fields, Blocks, Widgets, and Option Pages with ACF Builder on Sage 10.
https://github.com/Log1x/acf-composer
MIT License
413 stars 56 forks source link

Errors when using ">" in acf block view #161

Closed SergiArias closed 1 year ago

SergiArias commented 1 year ago

This was difficult to track, but I don't know why, when using ">" the acf block blade view fails. This doesn't happen in a regular blade view.

As an example (and using alpinejs), this fails (error: invalid character or token):

  <div x-data="{init() {[1,2].forEach((element)=>{console.log(element)})}}"></div>

Substituting the ">" for its > html entity it works:

  <div x-data="{init() {[1,2].forEach((element)=&gt;{console.log(element)})}}"></div>
Log1x commented 1 year ago

Neat workaround.

https://github.com/Log1x/acf-composer/issues/160 was opened the other day if you missed it.

SergiArias commented 1 year ago

Yeah! It was a long time ago bug that I thought was a Sage problem and I just detected where it came from recently, what a coincidence that Alex also ran into the same thing! I close it as it is a duplicate.