Because it does not know that the +
is not part of it. Use () around the ternary part so the order of operations does what you want.
$('dd.preview-step1').html('Market = <i>'+
((controller.state.operation.code === 'copy') ? controller.state.market.targetName : controller.state.market.name)
+'</i><br />Source = <i>'+ controller.state.source.name +'</i><br />Target = <i>'+ controller.state.target.name +'</i>');
See the extra (
and )
I added at the beginning and end of the second line above.