File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
views/components/markdown Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,15 @@ def body
43
43
end
44
44
45
45
def body_html
46
- ApplicationController . render ( inline : body , type : resource . handler , layout : false )
46
+ ApplicationController . render (
47
+ inline : body ,
48
+ type : ( resource . handler . to_sym == :mdrb ) ? :"mdrb-atom" : resource . handler ,
49
+ layout : false ,
50
+ content_type : "application/atom+xml" ,
51
+ assigns : {
52
+ format : :atom
53
+ }
54
+ )
47
55
end
48
56
49
57
def body_text
Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ def default_commonmarker_options
12
12
}
13
13
end
14
14
15
- def code_block ( source , language = "" , **attributes )
15
+ def code_block ( source , metadata = "" , **attributes )
16
+ language , _ = metadata . split ( ":" , 2 )
16
17
render CodeBlock ::Code . new ( source , language : language , **attributes )
17
18
end
18
19
19
20
def image ( src , alt : "" , title : "" )
21
+ title , _ = title . split ( "|" , 2 )
20
22
figure do
21
23
image_tag ( src , alt : alt , title : title )
22
24
figcaption { title }
You can’t perform that action at this time.
0 commit comments