1 parent 064b38b commit aab8193Copy full SHA for aab8193
2 files changed
src/markd/renderers/html_renderer.cr
@@ -57,6 +57,13 @@ module Markd
57
newline
58
if entering
59
tag("blockquote", attrs(node))
60
+ if node.data.fetch("alert", nil)
61
+ tag("div", {"class" => "alert alert-#{node.data["alert"]}"}) do
62
+ tag("strong") do
63
+ output(node.data["title"].as(String))
64
+ end
65
66
67
else
68
tag("blockquote", end_tag: true)
69
end
src/markd/rules/block_quote.cr
@@ -11,6 +11,7 @@ module Markd::Rule
11
# This is an alert
12
node.data["alert"] = match[1]
13
node.data["title"] = match[2].strip
14
+ parser.advance_offset(parser.line.size, false)
15
16
17
MatchValue::Container
0 commit comments