@tomhughes commented on this pull request.


> +      link_size = 0
+
+      doc = Nokogiri::HTML(text.to_html)
+
+      if doc.content.empty?
+        link_proportion = 0
+      else
+        doc.xpath("//a").each do |link|
+          link_count += 1
+          link_size += link.content.length
+        end
+
+        link_proportion = link_size.to_f / doc.content.length
+      end
+
+      downcased_content = doc.content.downcase

Ah it is available but confusingly as `downcase(:fold)` and that is what we've 
actually using now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6549#discussion_r2561189066
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6549/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to