Class: Nesta::Page
- Inherits:
-
Object
- Object
- Nesta::Page
- Defined in:
- lib/nesta-plugin-foldable/init.rb
Instance Method Summary collapse
Instance Method Details
#pre_fold_summary ⇒ Object
15 |
# File 'lib/nesta-plugin-foldable/init.rb', line 15 alias_method :pre_fold_summary, :summary |
#summary ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/nesta-plugin-foldable/init.rb', line 16 def summary result = pre_fold_summary return result if result && !result.empty? body_markup_text = body_markup if body_markup_text.include? '~~fold~~' summary_text = body_markup_text.sub(/^[^\n]*~~fold~~.*\Z/m, ''); convert_to_html(@format, nil, summary_text) else nil end end |