(builder, text, style, startStyle, endStyle)
| 4032 | } |
| 4033 | |
| 4034 | function buildTokenMeasure(builder, text, style, startStyle, endStyle) { |
| 4035 | for (var i = 0; i < text.length; ++i) { |
| 4036 | var ch = text.charAt(i), start = i == 0; |
| 4037 | if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) { |
| 4038 | ch = text.slice(i, i + 2); |
| 4039 | ++i; |
| 4040 | } else if (i && builder.cm.options.lineWrapping && |
| 4041 | spanAffectsWrapping.test(text.slice(i - 1, i + 1))) { |
| 4042 | builder.pre.appendChild(elt("wbr")); |
| 4043 | } |
| 4044 | builder.measure[builder.pos] = |
| 4045 | buildToken(builder, ch, style, |
| 4046 | start && startStyle, i == text.length - 1 && endStyle); |
| 4047 | builder.pos += ch.length; |
| 4048 | } |
| 4049 | if (text.length) builder.addedOne = true; |
| 4050 | } |
| 4051 | |
| 4052 | function buildCollapsedSpan(builder, size, widget) { |
| 4053 | if (widget) { |
nothing calls this directly
no test coverage detected