Skip to content

Commit

Permalink
docs: Add note about self-closing tags in rich text [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Jul 27, 2023
1 parent 83e5fe4 commit 431764d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/pages/docs/usage/messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<br></br>` if your rich text function doesn't intend to receive any `chunks` (e.g. `br: () => <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.
Expand Down

3 comments on commit 431764d

@vercel
Copy link

@vercel vercel bot commented on 431764d Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

example-next-13-next-auth – ./examples/example-next-13-next-auth

example-next-13-next-auth.vercel.app
example-next-13-next-auth-next-intl.vercel.app
example-next-13-next-auth-git-main-next-intl.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 431764d Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-example-next-13 – ./examples/example-next-13

next-intl-example-next-13-git-main-next-intl.vercel.app
next-intl-example-next-13-next-intl.vercel.app
next-intl-example-next-13.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 431764d Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-docs – ./docs

next-intl-docs.vercel.app
next-intl-docs-next-intl.vercel.app
next-intl-docs-git-main-next-intl.vercel.app

Please sign in to comment.