Fix lint.

Fix lint.

diff --git a/plugin.rb b/plugin.rb
index a4cc1ce..0f6b922 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -35,7 +35,10 @@ after_initialize do
         should_use_svg &&= !graph.classes.include?("graphviz-no-svg")
 
         if should_use_svg
+          # Changing to Nokogiri::HTML5.fragment returns `nil` for `.css('svg')`
+          # rubocop:todo Discourse/NoNokogiriHtmlFragment
           new_graph_node = Nokogiri::HTML.fragment(svg_graph).css("svg").first
+          # rubocop:enable Discourse/NoNokogiriHtmlFragment
           new_graph_node['class'] = "graphviz-svg-render"
           new_graph_node.xpath(svg_whitelist_xpath).remove
           graph.replace new_graph_node

GitHub sha: 262ef922

1 Like