-
Sorry, Me again. I have a liquid helper, included via Created a component and copied the content into the file
and replaced In Jekyll this inserts just the code, a word. How to migrate the helper to bridgetown? Maybe this is a topic for your Migration-guide as well? (this behavoir can be verified in https://github.com/topofocus/bridgetown-test) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The issue is present in another context, too. The cookie landing page template defines a <p class="..."> <%= @text %> </p> which is rendered as expected. However <p class="..."> <%= markdownify @text %> </p> instead of simply markdownyfying the content also inserts an paragraph:
Completely irritating is the behavior if not only a sentence is markdownified.
To reproduce: Add a sentence to should I open an Issue? |
Beta Was this translation helpful? Give feedback.
-
@topofocus Can you try running the content through the |
Beta Was this translation helpful? Give feedback.
-
So it seems, that using a ruby-class instead of a partial solves the problem. Thus replacing class Hieronymus
def render_in(view_context, &block)
<<~RR
<span class="..."> something</span>
RR
end
end provides the expected behaviour. |
Beta Was this translation helpful? Give feedback.
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
withrender Hieronymus.new
and providing this ashieronymus.rb
in_components
provides the expected behaviour.