Recognizing html tag inside of php string
I'm developing plugin for PhpStorm.
When I'm trying to find html tag in php file I get html tag inside of StringLiteralExpression as a result because of Language Injection.
How to recognize that the html tag not in real HTML context, but inside php string?
请先登录再写评论。
I don't know how do you find HTML tags but I try to guess and would suggest you to work with XmlFile instead of PhpFile.
Working with XmlFile you'll never get any PHP content and v.v.
Thank you for the reply.
But the task is not to find html tag in php file. I have annotator which finds cyrillic text inside html tags in php file and adds warning annotation.
For example
The next code snippet should help you.
P.S. Also, as we both now know that I'm bad in guessing it'd be better if you provide as much information as possible when you ask a question the next time ;) It'll save our time, thanks.
Thanks!
I'll give you more details next time :)