upstream fix for regex whitespace removal