instance method
visit__container
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
visit__container(_node, child_values)
A container contributes no Markdown of its own, and neither does an element with no visitor at all. #join_children reads a trailing blank line as “this value is a block” and uses it to keep the next value off the same line, so a container holding a block has to report one too. Flatten that away and a fence inside the container lands mid-line, releasing the pre content #markdown_for_node emits unescaped.
Parameters
-
_nodereq -
child_valuesreq
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 276
def visit__container(_node, child_values)
inner = join_children(child_values)
if child_values.any? { |value| block_value?(value) }
"#{inner.rstrip}\n\n"
else
inner
end
end
Defined in actiontext/lib/action_text/markdown_conversion.rb line 276
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::MarkdownConversion