instance method
inline_code
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
inline_code(content)
No documentation comment.
Parameters
-
contentreq
Source
# File actiontext/lib/action_text/markdown_conversion.rb, line 368
def inline_code(content)
max_run = content.scan(/`+/).map(&:length).max || 0
fence = "`" * [1, max_run + 1].max
if content.start_with?("`") || content.end_with?("`")
"#{fence} #{content} #{fence}"
else
"#{fence}#{content}#{fence}"
end
end
Defined in actiontext/lib/action_text/markdown_conversion.rb line 368
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::MarkdownConversion