mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
Merge pull request #14 from diaojunxian/master
bugfix: add maxreplace=1 to avoid similar variables are replaced by mistaken. For instance, if user=1000, then "/$user/$userid" will be replaced to be "/1000/1000id".
This commit is contained in:
@@ -49,7 +49,7 @@ def parse_variables(content, variable_mapping):
|
||||
# content contains one or many variables
|
||||
content = content.replace(
|
||||
"${}".format(variable_name),
|
||||
str(variable_value)
|
||||
str(variable_value), 1
|
||||
)
|
||||
|
||||
return content
|
||||
|
||||
Reference in New Issue
Block a user