Module: Legion::TTY::Components::MarkdownView
- Extended by:
- Logging::Helper
- Defined in:
- lib/legion/tty/components/markdown_view.rb
Class Method Summary collapse
Class Method Details
.render(text, width: 80) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/legion/tty/components/markdown_view.rb', line 14 def self.render(text, width: 80) ::TTY::Markdown.parse(text, width: width) rescue StandardError => e log.warn { "markdown render failed: #{e.}" } "#{text}\n(markdown render error: #{e.})" end |