Add escaping of strings that start with "@ " for android

This commit is contained in:
Kevin Everets 2013-01-17 11:45:57 -05:00
parent bd0953dce4
commit 41234c9f95

View file

@ -57,6 +57,9 @@ module Twine
# 1) use "s" instead of "@" for substituting strings
str.gsub!(/%([0-9\$]*)@/, '%\1s')
# 1a) escape strings that begin with a lone "@"
str.sub!(/^@ /, '\\@ ')
# 2) if there is more than one substitution in a string, make sure they are numbered
substituteCount = 0
startFound = false