instance method
strip_pretty_print_indentation
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
strip_pretty_print_indentation(node)
No documentation comment.
Parameters
-
nodereq
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 378
def strip_pretty_print_indentation(node)
content = node.content
return content unless content.include?("\n")
content
.sub(LEADING_PRETTY_PRINT_WHITESPACE, inline_sibling?(node.previous_sibling) ? " " : "")
.sub(TRAILING_PRETTY_PRINT_WHITESPACE, inline_sibling?(node.next_sibling) ? " " : "")
end
Defined in actiontext/lib/action_text/markdown_conversion.rb line 378
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::MarkdownConversion