(s, t)
| 51 | |
| 52 | |
| 53 | def _handle_word(s, t): |
| 54 | if t.startswith('.'): |
| 55 | return '.', t[1:] |
| 56 | if t.startswith('#'): |
| 57 | return 'id', t[1:] |
| 58 | # A word without a value is a valueless attribute. It is represented |
| 59 | # internally with a value of `None` so that what the user provided can |
| 60 | # be preserved. Consumers which assign the attribute to an element are |
| 61 | # responsible for restoring the historic `key="key"` representation |
| 62 | # for known boolean attributes (see `AttrListTreeprocessor.assign_attrs`). |
| 63 | return t, None |
| 64 | |
| 65 | |
| 66 | _scanner = re.Scanner([ |
nothing calls this directly
no outgoing calls
no test coverage detected