diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-05-12 14:53:31 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-05-12 14:53:31 -0400 |
| commit | b7c5853de5f0f04625eab6389cba9de8b02e48fb (patch) | |
| tree | 1764a974e1b93b024c90f98246590d0bac5430ef /app/helpers | |
| parent | 4016070f2caf30f576d0b0df8a65a7b4b468e951 (diff) | |
| download | thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.tar.gz thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.tar.bz2 thoughts-b7c5853de5f0f04625eab6389cba9de8b02e48fb.zip | |
Added streams index
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/application_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
| diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 97a897f..a51f1a1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | require 'redcarpet' | 1 | require 'redcarpet' |
| 2 | require 'rouge' | 2 | require 'rouge' |
| 3 | require 'rouge/plugins/redcarpet' | 3 | require 'rouge/plugins/redcarpet' |
| 4 | require 'redcarpet/render_strip' | ||
| 4 | 5 | ||
| 5 | module ApplicationHelper | 6 | module ApplicationHelper |
| 6 | 7 | ||
| @@ -45,4 +46,14 @@ module ApplicationHelper | |||
| 45 | ] | 46 | ] |
| 46 | end | 47 | end |
| 47 | 48 | ||
| 49 | class StrippedSummary < Redcarpet::Render::StripDown | ||
| 50 | def block_html(raw_html) | ||
| 51 | nil | ||
| 52 | end | ||
| 53 | end | ||
| 54 | |||
| 55 | def stripped_markdown(text) | ||
| 56 | Redcarpet::Markdown.new(StrippedSummary).render(text) | ||
| 57 | end | ||
| 58 | |||
| 48 | end | 59 | end |
