Improve Smarty Delimiter issue - #522
Conversation
|
Consider this test: With that solution, I expect that no tags will be converted resulting in an error. :( |
|
There is always a price to past sins :) Someone thought the non-standard smarty delimiters were a good idea. I think the ability to use examples from the manual, and builtin support in IDEs make ditching the legacy delimiters an even better idea. Hence the change. The filter code is to make it easier to test modules from 2.5. It isn't a long term feature. It is pretty easy to spot where it will have problem in new development, and a change in whitespace will fix it. Rather than introduce a more complex solution with inadequate consideration, this just improves the detection in a number cases. |
|
In modern IDE, like the PhpStorm, you can set the delimiters yourself, so this is not a problem anymore, especially since we've switched to .tpl extensions. |
But that is still a barrier, and there are a lot of IDE's besides PhpStorm. If it works out of the box with the default settings, that is a win IMO. |
|
Yup, I had my smarty delimiters in place but typing {} is more convenient.
Be careful with search and replace while migrating modules. I noticed that
in menus module there was a bug in the template.
This solution should be enough. I could imagine nested tags, it would get
ugly pretty fast. It reminds me of the problem of nested quotes and how
impossible it is to, when missing a close quote tag, to find what is
quoting what, lol.
2017-03-11 0:55 GMT+00:00 Mamba (Michael Beck) <[email protected]>:
… In modern IDE, like the PhpStorm, you can set the delimiters yourself, so
this is not a problem anymore, especially since we've switched to .tpl
extensions.
But being able to copy and paste examples from tutorials is definitely a
good thing.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#522 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGFR75RiR_KRcC_WRSnk1iPheAm31DhUks5rkfEHgaJpZM4MaAi9>
.
|
Not perfect, but smarter. Re #521