I have the following function which generate a fragment:
const f = (first, last) => {
<>{first}{first.indexOf("\'") > 0 ? "" : " "}<i>{last}</i></>
}
Then, I use the function in a piece of HTML
<Row>
here is {f("xxx","yyy")}.
</Row>
I expected exactly the following output:
<div>
here is xxx yyy.
</div>
but the result in the browser debug is the following:
<div> (flex)
"here is "
"xxx"
<i>yyy</i>
"."
</div>
and the browser displays as:
here is
xxx
yyy (<- this in italic)
.
I tried to wrap in a <span className="nowrap"> with
span .nowrap {
white-space: nowrap;
}
with no success.
Can someone provide some help?