mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
fix typo
This commit is contained in:
parent
02f3003601
commit
6e0130ed52
1 changed files with 1 additions and 3 deletions
|
@ -40,11 +40,9 @@ module Capybara
|
|||
# @return [String] The modified HTML code
|
||||
#
|
||||
def inject_asset_host(html)
|
||||
if Capybara.asset_host and
|
||||
Nokogiri::HTML(html).css("base").empty? and
|
||||
if Capybara.asset_host && Nokogiri::HTML(html).css("base").empty?
|
||||
match = html.match(/<head[^<]*?>/)
|
||||
html.clone.insert match.end(0), "<base href='#{Capybara.asset_host}' />"
|
||||
end
|
||||
else
|
||||
html
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue