File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 1
1
use super :: blogs:: Manifest ;
2
- use comrak:: { ComrakExtensionOptions , ComrakOptions , ComrakRenderOptions } ;
3
2
use regex:: Regex ;
4
3
use serde_derive:: { Deserialize , Serialize } ;
5
4
use std:: path:: { Path , PathBuf } ;
@@ -68,18 +67,14 @@ impl Post {
68
67
layout,
69
68
} = serde_yaml:: from_str ( yaml) ?;
70
69
// next, the contents. we add + to get rid of the final "---\n\n"
71
- 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
- ..ComrakOptions :: default ( )
70
+ let options = comrak:: Options {
71
+ render : comrak:: RenderOptionsBuilder :: default ( ) . unsafe_ ( true ) . build ( ) ?,
72
+ extension : comrak:: ExtensionOptionsBuilder :: default ( )
73
+ . header_ids ( Some ( String :: new ( ) ) )
74
+ . footnotes ( true )
75
+ . table ( true )
76
+ . build ( ) ?,
77
+ ..comrak:: Options :: default ( )
83
78
} ;
84
79
85
80
// Content starts after "---\n" (we don't assume an extra newline)
You can’t perform that action at this time.
0 commit comments