From b013f698621192df6b0ffaea4e165248399500d8 Mon Sep 17 00:00:00 2001 From: Kai Erik Niermann Date: Sat, 22 Jul 2023 17:44:56 +0200 Subject: [PATCH 1/2] fix: added parenthesis to literal notation example --- documentation/docs/02-template-syntax/02-basic-markup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/02-template-syntax/02-basic-markup.md b/documentation/docs/02-template-syntax/02-basic-markup.md index 7656a599bebc..761e66a8ece0 100644 --- a/documentation/docs/02-template-syntax/02-basic-markup.md +++ b/documentation/docs/02-template-syntax/02-basic-markup.md @@ -117,7 +117,7 @@ Text can also contain JavaScript expressions:

Hello {name}!

{a} + {b} = {a + b}.

-
{/^[A-Za-z ]+$/.test(value) ? x : y}
+
{(/^[A-Za-z ]+$/).test(value) ? x : y}
``` ## Comments From d450fea44a9f6adea2cc94389f7cd45e780f8b61 Mon Sep 17 00:00:00 2001 From: gtmnayan <50981692+gtm-nayan@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:44:32 +0545 Subject: [PATCH 2/2] add prettier-ignore --- documentation/docs/02-template-syntax/02-basic-markup.md | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/docs/02-template-syntax/02-basic-markup.md b/documentation/docs/02-template-syntax/02-basic-markup.md index 761e66a8ece0..281790ac71d2 100644 --- a/documentation/docs/02-template-syntax/02-basic-markup.md +++ b/documentation/docs/02-template-syntax/02-basic-markup.md @@ -113,6 +113,7 @@ 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. + ```svelte

Hello {name}!

{a} + {b} = {a + b}.