(self, i, declstartpos)
| 2023 | |
| 2024 | _new_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9:]*\s*').match |
| 2025 | def _scan_name(self, i, declstartpos): |
| 2026 | rawdata = self.rawdata |
| 2027 | n = len(rawdata) |
| 2028 | if i == n: |
| 2029 | return None, -1 |
| 2030 | m = self._new_declname_match(rawdata, i) |
| 2031 | if m: |
| 2032 | s = m.group() |
| 2033 | name = s.strip() |
| 2034 | if (i + len(s)) == n: |
| 2035 | return None, -1 # end of buffer |
| 2036 | return name.lower(), m.end() |
| 2037 | else: |
| 2038 | self.handle_data(rawdata) |
| 2039 | # self.updatepos(declstartpos, i) |
| 2040 | return None, -1 |
| 2041 | |
| 2042 | def convert_charref(self, name): |
| 2043 | return '&#%s;' % name |
nothing calls this directly
no test coverage detected