(self, i, declstartpos)
| 1945 | |
| 1946 | _new_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9:]*\s*').match |
| 1947 | def _scan_name(self, i, declstartpos): |
| 1948 | rawdata = self.rawdata |
| 1949 | n = len(rawdata) |
| 1950 | if i == n: |
| 1951 | return None, -1 |
| 1952 | m = self._new_declname_match(rawdata, i) |
| 1953 | if m: |
| 1954 | s = m.group() |
| 1955 | name = s.strip() |
| 1956 | if (i + len(s)) == n: |
| 1957 | return None, -1 # end of buffer |
| 1958 | return name.lower(), m.end() |
| 1959 | else: |
| 1960 | self.handle_data(rawdata) |
| 1961 | # self.updatepos(declstartpos, i) |
| 1962 | return None, -1 |
| 1963 | |
| 1964 | def convert_charref(self, name): |
| 1965 | return '&#%s;' % name |
nothing calls this directly
no test coverage detected