change placement and ordering

pull/5640/head
Ignatius Bagus 5 years ago
parent c28b8252d8
commit 07a9488656
No known key found for this signature in database
GPG Key ID: 357C6674A45CC06B

@ -136,17 +136,13 @@ An element or component can have multiple spread attributes, interspersed with r
Text can also contain JavaScript expressions:
> If you're using a regular expression (`RegExp`) [literal notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#literal_notation_and_constructor), you'll need to wrap it in parentheses.
```sv
<h1>Hello {name}!</h1>
<p>{a} + {b} = {a + b}.</p>
```
---
However, if you're using a regular expression (`RegExp`) [literal notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#literal_notation_and_constructor), you'll need to wrap it in parentheses.
```sv
<div>{(/^[A-Za-z ]+$/).test(value) ? 'foo' : 'bar'}</div>
<div>{(/^[A-Za-z ]+$/).test(value) ? x : y}</div>
```
### Comments

Loading…
Cancel
Save