Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Nokogiri options not passed to Builder #150

Closed
aiwilliams opened this Issue · 1 comment

2 participants

@aiwilliams

Is there a reason this is the case? I would like to send the :encoding option to the Nokogiri::XML::Builder initializer.

@judofyr
Collaborator

The reason for this is that the call to Nokogiri::XML::Builder.new is inlined and compiled so there's no easy way to send options there. You can however pass in a local variable called xml and Tilt will use that object:

tmpl = Tilt.new('index.nokogiri')
tmpl.render(Object.new, :xml => Nokogiri::XML::Builder.new(:encoding => …))
@judofyr judofyr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.