Skip to content

Unintended adding of a Paragraph when using a partial #572

Answered by topofocus
topofocus asked this question in Q&A
Discussion options

You must be logged in to vote

So it seems, that using a ruby-class instead of a partial solves the problem.
Its even not necessary to inherent it from Bridgetown::Component

Thus replacing render 'hieronymus with render Hieronymus.new and providing this as hieronymus.rbin _components

class Hieronymus
  def render_in(view_context, &block)
    <<~RR
        <span class="..."> something</span>
   RR
  end
end

provides the expected behaviour.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jaredcwhite
Comment options

Answer selected by topofocus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants