I have a string with chords like this
Bb
This is amazing grace
Eb
This is unfailing love
Gm
That You would take my place
F
That You would bear my cross
I used regex to match and replace the chords with strong tag
const boldLyrics = lyrics?.replace(
/(\b([CDEFGAB](?:b|bb)*(?:#|##|sus|maj|min|m|aug)*[\d\/]*(?:[CDEFGAB](?:b|bb)*(?:#|##|sus|maj|min|m|aug)*[\d\/]*)*)(?=\s|$)(?! \w))/gm,
`<strong>$1</strong>`
);
and called it as pre {boldLyrics} pre
but it keeps on showing the texts like this.
<strong>Bb</strong>
This is amazing grace