Text = "I have this text [b] and want this part to be bold [/b]."
How can I replace the [b]
and [/b]
with strong html tag
so that the output is => I have this text and want this part to be bold.
I tried using lodash replace like this but eslint is complaining for the closing tag:
let startTag = _.replace(text, '[b]', <strong>);
let endTag= _.replace(startTag, '[/b]', </strong>);