markdown content
This commit is contained in:
parent
cc9c3a38b9
commit
55b5808a66
1 changed files with 12 additions and 3 deletions
|
@ -1,8 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Contenido con el editor de Markdown
|
||||
class MetadataMarkdownContent < MetadataMarkdown
|
||||
def front_matter?
|
||||
false
|
||||
class MetadataMarkdownContent < MetadataContent
|
||||
# Renderizar a HTML y sanitizar
|
||||
def to_s
|
||||
sanitize CommonMarker.render_doc(value, %i[FOOTNOTES SMART],
|
||||
%i[table strikethrough autolink]).to_html
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue