(found: string, decimalValue: string, hexValue: string, wordValue: string)
| 443 | } |
| 444 | |
| 445 | function _HandleAmpEntities(found: string, decimalValue: string, hexValue: string, wordValue: string): string { |
| 446 | if (wordValue) { |
| 447 | if (!_ampCodes) { |
| 448 | _ampCodes = _generateAmpMap(); |
| 449 | } |
| 450 | const res = _ampCodes.get(wordValue); |
| 451 | if (res) { |
| 452 | return String.fromCodePoint(res); |
| 453 | } |
| 454 | |
| 455 | // Invalid word; so we just return it |
| 456 | return found; |
| 457 | } |
| 458 | if (decimalValue) { |
| 459 | return String.fromCodePoint(parseInt(decimalValue, 10)); |
| 460 | } |
| 461 | |
| 462 | return String.fromCodePoint(parseInt(hexValue, 16)); |
| 463 | } |
| 464 | |
| 465 | /** |
| 466 | * A simple non-validating SAX parser based on https://github.com/vflash/easysax version 0.1.14 |
nothing calls this directly
no test coverage detected