Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing a Node as the second parameter to Node.new is deprecated #295

Closed
timja opened this issue Mar 15, 2022 · 2 comments · Fixed by #296
Closed

Passing a Node as the second parameter to Node.new is deprecated #295

timja opened this issue Mar 15, 2022 · 2 comments · Fixed by #296

Comments

@timja
Copy link
Contributor

timja commented Mar 15, 2022

When I run bundle update on https://github.com/hmcts/hmcts.github.io
and then:

bundle exec middleman server

I get a lot of log spam about deprecation warnings from this project:

/Users/timja/projects/hmcts/hmcts.github.io/vendor/bundle/ruby/2.6.0/gems/govuk_tech_docs-3.2.0/lib/govuk_tech_docs/tech_docs_html_renderer.rb:72: warning: Passing a Node as the second parameter to Node.new is deprecated. Please pass a Document instead, or prefer an alternative constructor like Node#add_child. This will become an error in a future release of Nokogiri.

What should change

I think code around here:

tr = Nokogiri::XML::Node.new "tr", fragment

User need

Logs are un-readable and will get lots of questions from developers about if it's okay if it's left the way it is

@timja
Copy link
Contributor Author

timja commented Mar 16, 2022

I haven't been able to reproduce this warning in the example app 😢
https://github.com/alphagov/tech-docs-gem/tree/master/example

Also seeing this in our app:

Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.

@timja
Copy link
Contributor Author

timja commented Mar 16, 2022

Reproduced in the example app by adding a markdown table to the source files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant