Revision 1624
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xml_func.py | ||
---|---|---|
184 | 184 |
repl = r'(?<![^\W_])'+repl+r'(?![^\W_])' # match whole word |
185 | 185 |
value = re.sub(repl, with_, value) |
186 | 186 |
except sre_constants.error, e: raise SyntaxError(e) |
187 |
return util.none_if(value, u'') # empty strings always mean None |
|
187 |
return util.none_if(value.strip(), u'') # empty strings always mean None
|
|
188 | 188 |
funcs['_replace'] = _replace |
189 | 189 |
|
190 | 190 |
#### Quantities |
Also available in: Unified diff
xml_func.py: _replace: Strip whitespace from the returned string