Element opening and closing tags not being properly identified in code view

Wappler Version : 4.5.2
Operating System : Mac 11.6.3
Server Model: PHP
Database Type: MySQL
Hosting Type: docker

Expected behavior

What do you think should happen?

Clicking on an element in either code or design view highlights that elements opening and closing tags.

Actual behavior

What actually happens?

The proper closing tag is not found or the wrong element is selected in code view. This in turn causes issues when trying to change an element from the design view. (see video) Page shows no errors or warnings. (see screenshots)



How to reproduce

Open my page (which is an include file on other pages)
Select and element and go to code view. The selection is incorrect.
Edit something in design view and click out of the element and erroneous code is added to a random spot in the code.

Workaround

I have to edit everything in code view.

I believe it has something to do with PHP tags not being properly ignored. I suspected this since I suddenly got tons of errors in a page that contained PHP the other day. If you remember, it was causing Wappler to freeze so I had to turn off App Connect Mode in order to work on the page. That was something that didn’t start happening till a few versions ago.

I removed all php from the page and tested and it seemed to properly select elements. That said, I have way too much PHP to remove all of it so hopefully you guys have a fix in mind. :slight_smile: