instance method markdown_for_node

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

markdown_for_node(node, child_values)

No documentation comment.

Parameters

node req
child_values req
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 121
      def markdown_for_node(node, child_values)
        if node.text?
          if node.content.blank? && !significant_whitespace?(node)
            ""
          elsif skip_markdown_escaping?(node)
            node.content
          else
            escape_markdown_text(strip_pretty_print_indentation(node))
          end
        elsif node.element?
          method_name = :"visit_#{node.name.tr("-", "_")}"
          if respond_to?(method_name, true)
            send(method_name, node, child_values)
          else
            join_children(child_values).strip
          end
        else
          join_children(child_values)
        end
      end

Defined in actiontext/lib/action_text/markdown_conversion.rb line 121 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionText::MarkdownConversion

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close