lib/pennyworth/loaders/htmx.rb in pennyworth-17.4.1 vs lib/pennyworth/loaders/htmx.rb in pennyworth-17.5.0

- old
+ new

@@ -6,11 +6,11 @@ module Pennyworth module Loaders # Loads htmx documentation by scraping web page. class HTMX - include Import[:http] + include Import[:http, :settings] using Refinements::String PARSER = Ox.tap do |ox| ox.default_options = {mode: :generic, effort: :tolerant, smart: true} @@ -52,10 +52,10 @@ def record_for item, description, uri model[ label: (item.locate("*/code").first || item.locate("a").first).text, description: "#{self.class.text_for description}.", - uri: item.locate("*/@href").first || uri + uri: (item.locate("*/@href").first || uri).sub(%r(\A(?=/)), settings.htmx_site_uri) ] end end end end