()
| 262 | return data |
| 263 | |
| 264 | def get_entitydefs(): |
| 265 | from codecs import latin_1_decode |
| 266 | entitydefs = {} |
| 267 | try: |
| 268 | _html_entities.name2codepoint |
| 269 | except AttributeError: |
| 270 | entitydefs = {} |
| 271 | for name, char in _html_entities.entitydefs.items(): |
| 272 | uc = latin_1_decode(char)[0] |
| 273 | if uc.startswith("&#") and uc.endswith(";"): |
| 274 | uc = unescape_charref(uc[2:-1], None) |
| 275 | entitydefs["&%s;" % name] = uc |
| 276 | else: |
| 277 | for name, codepoint in _html_entities.name2codepoint.items(): |
| 278 | entitydefs["&%s;" % name] = _unichr(codepoint) |
| 279 | return entitydefs |
| 280 | |
| 281 | def issequence(x): |
| 282 | try: |
no test coverage detected
searching dependent graphs…