From bf4b3ae5fb4f25c5d796be135544679ada35bef3 Mon Sep 17 00:00:00 2001 From: Christian Kaisermann Date: Fri, 13 Nov 2020 15:29:10 -0300 Subject: [PATCH] Fix marker interpolation --- CHANGELOG.md | 2 ++ react/IOMessageWithMarkers.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2cbc62..bde2394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Marker interpolation bug introduced on `0.7.2`. ## [0.7.2] - 2020-11-12 ### Changed diff --git a/react/IOMessageWithMarkers.tsx b/react/IOMessageWithMarkers.tsx index fa3c917..a592b19 100644 --- a/react/IOMessageWithMarkers.tsx +++ b/react/IOMessageWithMarkers.tsx @@ -20,7 +20,7 @@ const IOMessageWithMarkers: IOMessageWithMarkersType = ({ const markerComponents = markers.reduce((acc, marker) => { // for more information check https://github.com/formatjs/react-intl/blob/master/docs/Components.md#rich-text-formatting // eslint-disable-next-line react/display-name - acc[marker] = (chunks) => ( + acc[marker] = (...chunks) => ( {chunks}