Double curly brackets assumed as Mustache braces
Closed this issue · 2 comments
anonimusprogramus commented
Version:
adonis 4.1.0
node 10.15.1
npm 6.9.0
Recreating steps:
-
Open Named Route Docs
-
There is this example:
The same rules apply for the view.
<a href="{{ route('posts.show', { id: 1 }, {query: { foo: 'bar' }}) }}">Show post</a>
// href="/post/1?foo=bar"
- Try running it, you'd get error:
InvalidExpressionException E_INVALID_EXPRESSION: Invalid expression < route('posts.show', { id: 1 }, {query: { foo: 'bar' >
- Now separate those double curly brackets with one space char:
{query: { foo: 'bar' }}
become {query: { foo: 'bar' } }
- Re-run, now it works.
LeNiglo commented
Agreed.
This is weird and not intuitive at all.
Even the Synthax Highlighter can handle the double closing braces according.
Furthermore, the querystring isn't set accordingly using this exemple ...
thetutlage commented
Fixed in v3.0.0
. It has breaking changes and will be out by end of the week