Smarty {literal} tag highlighting |
|
I think it may use whatever highlighting the {literal} tag possesses.
For example: if the {literal} tag is inside a <script type="text/javascript"> block, then all the code inside of it has javascript highlighting. I haven't really tested this in many other situation, but with javascript to get highlighting, I put it inside the <script> tag. Same thing for styles. |
||||||||||||
|
|
Thanks for the info. I got the standard "working as intended" reply from my bug report email that I expected. I still think it should follow dynamic highlighting rules though.
|
||||||||||||
|
Site Admin
|
"dynamic highlighting" is a different term. When turned on, it highlights only areas with the same language as under the cursor. In case of {literal}, it's still smarty area. The only difference of this area is that no smarty tags are recognized in it, except {/literal}.
|
||||||||||||
_________________ The PHP IDE team |
|
That's great and all, but it's still annoying to try to edit 100+ lines of javascript inside {literal} tags without syntax highlighting. Surely I'm not the only one with that problem.
|
||||||||||||
|
|
If you are using it inside of a smarty.tpl and you have <script type="text/javascript"> around it, then put the literal tag inside the script block. This will cause the editor to move out of the smarty highlighting mode and into javascript mode. Once it is in javascript mode, it will (essentially) just ignore the {literal} tag (or treat it as a syntax error) and continue using javascript highlighting until it finds a </script> tag.
So to get javascript highlighting, do it like this: <script type="text/javascript"> {literal} ... javascript ... {/literal} </script> |
||||||||||||
|
Smarty {literal} tag highlighting |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by