-
Notifications
You must be signed in to change notification settings - Fork 644
Deprecation: legacy for
Taylor Hunt edited this page Aug 2, 2019
·
2 revisions
The <for>
tag has been updated to take advantage of tag parameters.
Previously, <for>
lived in an uncanny valley of being almost JavaScript, but with a bunch of extras. The new version uses tag parameters to support its three common variants without custom syntax. (See the changing pull request for more examples of the old <for>
syntax.)
<for(item in array)>
…becomes:
<for|item| of=array>
<for(key, val in object)>
…becomes:
<for|key, value| in=object>
<for(i from 0 to 10 step 2)>
…becomes:
<for|i| from=0 to=10 step=2>
To automatically fix deprecated marko syntax, try the marko migrate
command from the CLI.