Add escaping of strings that start with "@ " for android
This commit is contained in:
parent
bd0953dce4
commit
41234c9f95
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Reference in a new issue