Sha256: 47081bd45ad90e1b764d6903a76803e086d3f7b11fd2d577f203d93317d967da
Contents?: true
Size: 328 Bytes
Versions: 30
Compression:
Stored size: 328 Bytes
Contents
class String def render_markdown(options = {}) Nexmo::OAS::Renderer::MarkdownPipeline.new(options).call(self).html_safe end def unindent indent = squeeze("\n").lines.map { |line| line.index(/[^\s]/) }.compact.min || 0 gsub(/^[[:blank:]]{#{indent}}/, '') end def unindent! replace(unindent) end end
Version data entries
30 entries across 30 versions & 1 rubygems