INNER CODE UNIT · Python
_handle_single_quote
pingbird/puro · website/pm_attr_list.py:33
def _handle_single_quote(_, t):
k, v = t.split('=', 1)
return k, v.strip("'")
def _handle_key_value(_, t):
return t.split('=', 1)
def _handle_word(_, t):
if t.startswith('.'):
return '.', t[1:]
if t.startswith('#'):
return 'id', t[1:]
return t, t
_scanner = re.Scanner([