5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 11:26:21 +00:00

el filtro de commonmark para haml arroja un error

This commit is contained in:
f 2019-07-27 12:25:05 -03:00
parent 199d86688c
commit 59ab20b887
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 4 additions and 21 deletions

View file

@ -25,8 +25,8 @@
.row
.col
.content{class: @post.get_front_matter(:dir)}
:markdown
#{@post.content}
= sanitized_markdown @post.content,
tags: %w[h1 h2 h3 h4 h5 h6 p a ul ol li table tr td th tbody thead tfoot em strong sup blockquote cite pre]
-# Representar los datos en una tabla:
-# Texto: tal cual en una celda
@ -73,8 +73,8 @@
%td= v
- elsif data.respond_to? :content
-# Contenido del artículo
:markdown
#{data.content}
= sanitized_markdown data.content,
tags: %w[h1 h2 h3 h4 h5 h6 p a ul ol li table tr td th tbody thead tfoot em strong sup blockquote cite pre]
- elsif data.respond_to? :strftime
-# Fecha
= data.strftime('%F')

View file

@ -1,17 +0,0 @@
# frozen_string_literal: true
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],
%i[table strikethrough autolink tagfilter])
end
end
end