lib/bridgetown-lit-renderer/builder.rb in bridgetown-lit-renderer-2.0.0.beta3 vs lib/bridgetown-lit-renderer/builder.rb in bridgetown-lit-renderer-2.0.0
- old
+ new
@@ -41,19 +41,19 @@
end
[k, processed_value]
end
end
- helper "lit", helpers_scope: true do | # rubocop:todo Metrics/ParameterLists
+ helper "lit" do | # rubocop:todo Metrics/ParameterLists
tag = nil,
data: {},
hydrate_root: true,
entry: "./config/lit-components-entry.js",
**kwargs,
&block
|
- code = block ? view.capture(&block) : ""
+ code = block ? helpers.view.capture(&block) : ""
code = process_tag.(tag, kwargs, code) if tag
if hydrate_root
code = "<hydrate-root>#{code.sub(%r{<([a-zA-Z]+-[a-zA-Z-]*)}, "<\\1 defer-hydration")}</hydrate-root>" # rubocop:disable Layout/LineLength
end
@@ -73,7 +73,5 @@
end
end
end
end
end
-
-BridgetownLitRenderer::Builder.register