How can I show more than one white space character in a row in a select2 data row?
问题 I'm using Select2 and I use the {data: [{id:1, text: "..."}] approach to define the options. I want to format each option by grouping the substring it's made up of using more than one white space character. So something like this: {data: [ {id:1, text: "Trees - Oak"}, {id:2, text: "Trees - Pine"}, {id:3, text: "Seas - North Sea"}, {id:4, text: "Seas - Baltic Sea"} ]} When I do this they show up as one space in the resulting dropdown (the default HTML way of dealing with spaces). When I use