(cp: number, consumed: number)
| 1166 | } |
| 1167 | |
| 1168 | private emitCodePoint(cp: number, consumed: number): void { |
| 1169 | if (!__BROWSER__) { |
| 1170 | if (this.baseState !== State.Text && this.baseState !== State.InRCDATA) { |
| 1171 | if (this.sectionStart < this.entityStart) { |
| 1172 | this.cbs.onattribdata(this.sectionStart, this.entityStart) |
| 1173 | } |
| 1174 | this.sectionStart = this.entityStart + consumed |
| 1175 | this.index = this.sectionStart - 1 |
| 1176 | |
| 1177 | this.cbs.onattribentity( |
| 1178 | fromCodePoint(cp), |
| 1179 | this.entityStart, |
| 1180 | this.sectionStart, |
| 1181 | ) |
| 1182 | } else { |
| 1183 | if (this.sectionStart < this.entityStart) { |
| 1184 | this.cbs.ontext(this.sectionStart, this.entityStart) |
| 1185 | } |
| 1186 | this.sectionStart = this.entityStart + consumed |
| 1187 | this.index = this.sectionStart - 1 |
| 1188 | |
| 1189 | this.cbs.ontextentity( |
| 1190 | fromCodePoint(cp), |
| 1191 | this.entityStart, |
| 1192 | this.sectionStart, |
| 1193 | ) |
| 1194 | } |
| 1195 | } |
| 1196 | } |
| 1197 | } |
no test coverage detected