mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-14 22:51:41 +00:00
usar reverse_markdown para procesar actiontext
This commit is contained in:
parent
74ec630377
commit
c23fe03303
4 changed files with 13 additions and 3 deletions
1
Gemfile
1
Gemfile
|
@ -55,6 +55,7 @@ gem 'rails-i18n'
|
|||
gem 'rails_warden'
|
||||
gem 'redis', require: %w[redis redis/connection/hiredis]
|
||||
gem 'redis-rails'
|
||||
gem 'reverse_markdown', git: 'https://0xacab.org/sutty/reverse_markdown.git'
|
||||
gem 'rubyzip'
|
||||
gem 'rugged'
|
||||
gem 'sidekiq'
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
GIT
|
||||
remote: https://0xacab.org/sutty/reverse_markdown.git
|
||||
revision: 5c243096669aa77e0dc173dec8006b4c5fe07683
|
||||
specs:
|
||||
reverse_markdown (1.2.0)
|
||||
nokogiri
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
|
@ -462,6 +469,7 @@ DEPENDENCIES
|
|||
rbnacl (< 5.0)
|
||||
redis
|
||||
redis-rails
|
||||
reverse_markdown!
|
||||
rubocop-rails
|
||||
rubyzip
|
||||
rugged
|
||||
|
|
|
@ -10,7 +10,10 @@ class MetadataContent < MetadataTemplate
|
|||
end
|
||||
|
||||
def value
|
||||
sanitize(self[:value] || document.content || default_value,
|
||||
markdown = ReverseMarkdown.convert(self[:value]).strip
|
||||
markdown = nil if markdown.blank?
|
||||
|
||||
sanitize(markdown || document.content || default_value,
|
||||
sanitize_options).tr("\r", '')
|
||||
end
|
||||
|
||||
|
|
|
@ -67,8 +67,6 @@ cada edición se van a degradar los textos sino.
|
|||
|
||||
# TODO
|
||||
|
||||
* Soportar ~tachado~ en reverse_markdown
|
||||
* Soportar <figure>
|
||||
* No escapar los bloques de cita al sanitizar
|
||||
* Crear plugin que convierta imagenes remotas en locales
|
||||
* Probar qué otros adjuntos soporta trix y limitarlos (?)
|
||||
|
|
Loading…
Reference in a new issue