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
120 121 122 |
# File 'app/helpers/lines/application_helper.rb', line 120 def format_code(text) simple_format( truncate( Sanitize.clean(markdown(text)).html_safe, escape: false, length: 300, separator: ' ', omission: ' …' )) end |