I have a file formatted like this one:
Eye color Eye color, color blue, cornflower blue, steely blue
Eye color, color
blue, cornflower blue, steely blue
One-liner:
cat text | perl -pE 's{\K.*?(?=<\/p>)}{ join ", ", map {qq|$_|} split /, */, $& }eg'
\K.*?(?=<\/p>)}{ join ", ", map {qq|$_|} split /, */, $& }eg'