Closed
Description
Describe the bug
On https://svelte.dev/docs/basic-markup#text-expressions (source markdown), there is an aside that reads:
If you're using a regular expression (
RegExp
) literal notation, you'll need to wrap it in parentheses.
This is followed by a markup sample:
<div>{/^[A-Za-z ]+$/.test(value) ? x : y}</div>
Note that in the sample, the RegExp
literal is not wrapped in parentheses. Therefore this section of the doc becomes confusing to users: do you need to wrap RegExp
literals in parentheses or not?
Reproduction
Navigate to https://svelte.dev/docs/basic-markup#text-expressions
Logs
N/A
System Info
N/A
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels