From 431764da83f231083a34d35ea9f9b24b338f8c0c Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Thu, 27 Jul 2023 11:10:15 +0200 Subject: [PATCH] docs: Add note about self-closing tags in rich text [skip ci] --- docs/pages/docs/usage/messages.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/docs/usage/messages.mdx b/docs/pages/docs/usage/messages.mdx index 00a7b407f..d502541bd 100644 --- a/docs/pages/docs/usage/messages.mdx +++ b/docs/pages/docs/usage/messages.mdx @@ -166,6 +166,8 @@ t.rich('richText', { If you want to use the same tag multiple times, you can configure it via the [default translation values](/docs/configuration#default-translation-values). +Note that the ICU parser doesn't support self-closing tags at this point, therefore you have to use syntax like `

` if your rich text function doesn't intend to receive any `chunks` (e.g. `br: () =>
`). + ## Arrays of messages If you need to render a list of messages, the recommended approach is to map an array of keys to the corresponding messages.