JSFiddle - React, Tailwind, and code Playground

HTML

<div class='test'>
color:red;background-color:black;
</div>

JavaScript

var test = $('.test').text();
var result = test.replace(/\;/g,';<br/>');   

$('.test').html(result);