diff options
| author | Nihad Abbasov <narkoz.2008@gmail.com> | 2011-10-30 17:41:57 +0400 |
|---|---|---|
| committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2011-10-30 17:41:57 +0400 |
| commit | 1f3323f9088b897220dc4989ac8da0ef71001ce1 (patch) | |
| tree | 114ddcab09e8fdf8e77ad10e16c045caca849488 /app/helpers | |
| parent | 6c7706eb17cff08ba0c3cccc3ebcfc969ae0f6e3 (diff) | |
| download | gitlab-ce-1f3323f9088b897220dc4989ac8da0ef71001ce1.tar.gz | |
use helper to markdown text
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 599d1e5c5c9..fbca5ea5d66 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -30,6 +30,10 @@ module ApplicationHelper end end + def markdown(text) + RDiscount.new(text, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe + end + def search_autocomplete_source projects = current_user.projects.map{ |p| { :label => p.name, :url => project_path(p) } } default_nav = [ |
