Skip to content

Commit

Permalink
Minor performance
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Jun 7, 2020
1 parent 144ecd9 commit 33a46da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def HTML(html) # rubocop:disable Naming/MethodName
template.inner_html = ''
end
document.xpath('//textarea').each do |textarea|
textarea['_capybara_raw_value'] = textarea.content.sub(/\A\n/, '')
textarea['_capybara_raw_value'] = textarea.content.delete_prefix("\n")
end
end
end
Expand Down

0 comments on commit 33a46da

Please sign in to comment.