module MarkdownConversion
Ruby on Rails edge
Since edgeAction Text Markdown Conversion
Converts an HTML fragment into a Markdown string. Used by ActionText::Content#to_markdown and ActionText::Fragment#to_markdown to produce Markdown representations of rich text.
Example: <h1>Release Notes</h1> => # Release Notes, a markdown heading.
Note that this converter escapes text nodes so it won’t render as markdown.
Example: <p># Release Notes</p> => \# Release Notes, not a heading.
Constants
- ActionText::MarkdownConversion::BOLD_TAGS
- ActionText::MarkdownConversion::ENCODE_HREF_CHARS
- ActionText::MarkdownConversion::INLINE_ELEMENTS
- ActionText::MarkdownConversion::ITALIC_TAGS
- ActionText::MarkdownConversion::LEADING_PRETTY_PRINT_WHITESPACE
- ActionText::MarkdownConversion::LIST_BULLET
- ActionText::MarkdownConversion::LIST_INDENT
- ActionText::MarkdownConversion::MARKDOWN_METACHARACTERS
- ActionText::MarkdownConversion::RAW_MARKDOWN_TAG_NAME
- ActionText::MarkdownConversion::SKIP_ESCAPING_PARENTS
- ActionText::MarkdownConversion::TRAILING_PRETTY_PRINT_WHITESPACE
Methods (defined here)
Private methods (45)
Show private methods Implementation detail — not part of the public API.
- # ancestor_named?
- # child_values_for_elements
- # code_fence
- # encode_href
- # flatten_to_inline
- # format_list_item
- # inline_code
- # inline_sibling?
- # join_children
- # list_item_lines
- # markdown_for_node
- # significant_whitespace?
- # skip_markdown_escaping?
- # stringify
- # strip_pretty_print_indentation
- # visit_a
- # visit_action_text_markdown
- # visit_b
- # visit_blockquote
- # visit_br
- # visit_code
- # visit_del
- # visit_div
- # visit_em
- # visit_h1
- # visit_h2
- # visit_h3
- # visit_h4
- # visit_h5
- # visit_h6
- # visit__heading
- # visit_hr
- # visit_i
- # visit_ol
- # visit_p
- # visit__passthrough
- # visit_pre
- # visit_s
- # visit_strong
- # visit_summary
- # visit__table_header_row
- # visit_tr
- # visit_ul
- # visit__unsupported
- # wrap_emphasis