instance method
list_item_lines
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
list_item_lines(list_node, child_values, prefix:)
No documentation comment.
Parameters
-
list_nodereq -
child_valuesreq -
prefixkeyreq
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 289
def list_item_lines(list_node, child_values, prefix:)
element_values = child_values_for_elements(list_node, child_values)
element_values.each_with_index.filter_map do |value, index|
text = stringify(value)
lines = text.split("\n").reject(&:blank?)
next if lines.empty?
bullet = prefix.respond_to?(:call) ? prefix.call(index) : prefix
format_list_item(lines, bullet)
end.join("\n")
end
Defined in actiontext/lib/action_text/markdown_conversion.rb line 289
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::MarkdownConversion