clarify sentence and expression for easier ctrl+f

pull/5640/head
Ignatius Bagus 5 years ago committed by GitHub
parent aa9f7c2929
commit c28b8252d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,10 +143,10 @@ Text can also contain JavaScript expressions:
---
However, if you're using regular expression literal that starts with `/`, you'll need to wrap it in parentheses.
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) ? 'foo' : 'bar'}</div>
```
### Comments

Loading…
Cancel
Save