def attribute_name(state, text, i, formats, user_data):
 ch = text[i]
 if (ch in space_chars):
  return [(1, None)]
 if (ch == u'='):
  state.parse = ATTRIBUTE_VALUE
  return [(1, formats[u'attr'])]
 state.parse = IN_OPENING_TAG
 state.attribute_name = None
 return [(0, None)]

def attribute_name ( state , text , i , formats , user_data ) : ch = text [ i ] if ( ch in space_chars ) : return [ ( 1 , None ) ] if ( ch == u'=' ) : state . parse = ATTRIBUTE_VALUE return [ ( 1 , formats [ u'attr' ] ) ] state . parse = IN_OPENING_TAG state . attribute_name = None return [ ( 0 , None ) ]
after attribute name .