score:1

Accepted answer
{testString
  .split(/<br ?\/?>/)
  .flatMap((line, i) => [line, <br key={`line-${i}`} />])}

Related Query

More Query from same tag