remove unwanted replace

I don't want to remove space between text and `%` string, but I guess there is some reason. What this `gsub!` means?