mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 05:06:21 +00:00
el filtro de commonmark para haml arroja un error
This commit is contained in:
parent
199d86688c
commit
59ab20b887
2 changed files with 4 additions and 21 deletions
|
@ -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')
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue