Method: Lines::ApplicationHelper#format_code
- Defined in:
- app/helpers/lines/application_helper.rb
#format_code(text) ⇒ Object
Returns HTML for code blocks formatted with Pygment
90 91 92 |
# File 'app/helpers/lines/application_helper.rb', line 90 def format_code(text) simple_format( truncate( Sanitize.clean(markdown(text)), length: 300, separator: ' ', omission: ' ...' )) end |