usar commonmarker closes #34

This commit is contained in:
f 2018-02-23 16:12:39 -03:00
parent 5ec7c45861
commit bd3a19de14
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 24 additions and 0 deletions

View file

@ -30,6 +30,7 @@ gem 'jbuilder', '~> 2.5'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'commonmarker'
gem 'email_address'
gem 'rails_warden'
gem 'haml-rails'

View file

@ -80,6 +80,8 @@ GEM
chronic (0.10.2)
coderay (1.1.2)
colorator (1.1.0)
commonmarker (0.17.8)
ruby-enum (~> 0.5)
concurrent-ruby (1.0.5)
crass (1.0.3)
dotenv (2.2.1)
@ -213,6 +215,8 @@ GEM
rbnacl (4.0.2)
ffi
rouge (3.1.0)
ruby-enum (0.7.2)
i18n
ruby_dep (1.5.0)
ruby_parser (3.10.1)
sexp_processor (~> 4.9)
@ -288,6 +292,7 @@ DEPENDENCIES
capistrano-rails
capistrano-rbenv
capybara (~> 2.13)
commonmarker
dotenv-rails
email_address
exception_notification

View file

@ -0,0 +1,18 @@
require 'commonmarker'
module Haml::Filters
remove_filter("Markdown") #remove the existing Markdown filter
module Markdown
include Haml::Filters::Base
def render(text)
CommonMarker.render_html(text,
[:TABLE_PREFER_STYLE_ATTRIBUTES],
[:table,:strikethrough,:autolink,:tagfilter])
end
end
end