instance method
single_line_context?
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
single_line_context?(node)
A fenced code block opens only at the start of a line. A link, a heading, a summary and a table row or cell each splice their descendants into a line they have already begun, and Markdown cannot hold a block inside an inline element at all, so under any of them the fence never opens and the pre content #markdown_for_node emits unescaped is released as Markdown source. See SKIP_ESCAPING_PARENTS.
Parameters
-
nodereq
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 452
def single_line_context?(node)
node.ancestors.any? { |ancestor| ancestor.element? && ancestor.name.in?(SINGLE_LINE_ANCESTORS) }
end
Defined in actiontext/lib/action_text/markdown_conversion.rb line 452
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::MarkdownConversion