mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 20:16:23 +00:00
no romper markdown!
This commit is contained in:
parent
ebbca76f5b
commit
74845734cf
1 changed files with 8 additions and 0 deletions
|
@ -1,9 +1,17 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Contenido con el editor de Markdown
|
||||||
class MetadataMarkdownContent < MetadataContent
|
class MetadataMarkdownContent < MetadataContent
|
||||||
# Renderizar a HTML
|
# Renderizar a HTML
|
||||||
def to_s
|
def to_s
|
||||||
CommonMarker.render_doc(value, %i[FOOTNOTES SMART],
|
CommonMarker.render_doc(value, %i[FOOTNOTES SMART],
|
||||||
%i[table strikethrough autolink]).to_html
|
%i[table strikethrough autolink]).to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# XXX: No sanitizamos acá porque se escapan varios símbolos de
|
||||||
|
# markdown y se eliminan autolinks. Mejor es habilitar la generación
|
||||||
|
# SAFE de CommonMark en la configuración del sitio.
|
||||||
|
def sanitize(string)
|
||||||
|
string
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue