File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,19 @@ impl Post {
68
68
layout,
69
69
} = serde_yaml:: from_str ( yaml) ?;
70
70
// next, the contents. we add + to get rid of the final "---\n\n"
71
+
72
+ let mut render_options = ComrakRenderOptions :: default ( ) ;
73
+ // Allow rendering of raw HTML
74
+ render_options. unsafe_ = true ;
75
+
76
+ let mut extension_options = ComrakExtensionOptions :: default ( ) ;
77
+ extension_options. header_ids =Some ( String :: new ( ) ) ;
78
+ extension_options. footnotes =true ;
79
+ extension_options. table =true ;
80
+
71
81
let options = ComrakOptions {
72
- render : ComrakRenderOptions {
73
- unsafe_ : true , // Allow rendering of raw HTML
74
- ..ComrakRenderOptions :: default ( )
75
- } ,
76
- extension : ComrakExtensionOptions {
77
- header_ids : Some ( String :: new ( ) ) ,
78
- footnotes : true ,
79
- table : true ,
80
- ..ComrakExtensionOptions :: default ( )
81
- } ,
82
+ render : render_options,
83
+ extension : extension_options,
82
84
..ComrakOptions :: default ( )
83
85
} ;
84
86
You can’t perform that action at this time.
0 commit comments