File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,12 @@ def serialize_name(value):
7676 "\r " : r"\D " ,
7777 "\f " : r"\C " ,
7878 }
79- _re_string_value = re .compile ("[" + "" .join (re .escape (e ) for e in _replacement_string_value .keys ()) + "]" ,
80- re .MULTILINE )
81-
79+ _re_string_value = "" .join (re .escape (e ) for e in _replacement_string_value .keys ())
80+ _re_string_value = re .compile ("[" + _re_string_value + "]" , re .MULTILINE )
81+ def _serialize_string_value_match (match ):
82+ return _replacement_string_value [match .group (0 )]
8283def serialize_string_value (value ):
83- return _re_string_value .sub (lambda match : _replacement_string_value [ match . group ( 0 )] , value )
84+ return _re_string_value .sub (_serialize_string_value_match , value )
8485
8586
8687def serialize_url (value ):
You can’t perform that action at this time.
0 commit comments