Module: Dolt::View::SmartBlobRenderer
- Includes:
- Markup, SyntaxHighlight
- Defined in:
- lib/libdolt/view/smart_blob_renderer.rb
Instance Method Summary collapse
Methods included from SyntaxHighlight
#highlight, #highlight_multiline, #highlighter
Methods included from Markup
#render_markup, #supported_markup_format?
Instance Method Details
#format_text_blob(path, content, repo = nil, ref = nil, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/libdolt/view/smart_blob_renderer.rb', line 27 def format_text_blob(path, content, repo = nil, ref = nil, = {}) begin return render_markup(path, content) if supported_markup_format?(path) rescue StandardError => err $stderr.puts("Failed rendering markup in #{path}, render syntax highlighted insted") $stderr.puts("Original error was: #{err}") $stderr.puts(err.backtrace) end highlight_multiline(path, content, ) end |