-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programming Style #42
Comments
And maybe with V6, now might be a good time to enforce certain programming styles (an in-house style book) for any product to be included in the Marketplace. |
Brian you are such a wonderful supporter and with all the help and attention you give myself and others I will be very keen to do this. A marketplace programming style would be nice.. so long as people looked at it. I don't want to police mods too hard the rating system should do that for us. Any really poor ones will just be removed. I hope we start seeing some action there soon.. |
I'm concerned this will scare off developers making skin changes. I also fear adding bugs. e.g. >= is common syntax "gte", isn't. Sublime Text parses this ok. Would the developers at UltraEdit be able to add Smarty compatibility? I'm sure a bit of basic regex in the code editor will resolve this. |
I'm going to close this as I believe the syntax with angle brackets is more familiar for most users. Did you see this? http://www.ultraedit.com/downloads/extras/wordfiles.html In particular the Smarty uew file? I'm sure there must be a regex mod for UltraEdit to achieve this. |
A request:
My programmer's text editor (UltraEdit) can match on start/end delimiters and HTML tags. For example:
such that when the text cursor is on the
<div>
, it is highlighted as well as</div>
.Unfortunately, it relies on counting the < and > characters and not so much on the actual tag itself since the tag could contain attributes.
So, using the less-than and greater-than characters in the Smarty syntax will confuse the matching feature.
Therefore, I humbly request that the in-house programming style adopt the usage of employing lt and gt and the other alpha-only variants of expression comparisons wherever possible:
{for $i=1 to 5}
{if $PRODUCT.review_score gte $i}
{elseif $PRODUCT.review_score gt ($i - 1) && $PRODUCT.review_score lt $i}
as examples.
The text was updated successfully, but these errors were encountered: