File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -267,20 +267,12 @@ impl MarkdownConfig for AppConfig {
267
267
}
268
268
269
269
/// Helper to render markdown with configurable options
270
+ #[ derive( Default ) ]
270
271
struct MarkdownHelper {
271
272
allow_dangerous_html : bool ,
272
273
allow_dangerous_protocol : bool ,
273
274
}
274
275
275
- impl Default for MarkdownHelper {
276
- fn default ( ) -> Self {
277
- Self {
278
- allow_dangerous_html : false ,
279
- allow_dangerous_protocol : false ,
280
- }
281
- }
282
- }
283
-
284
276
impl MarkdownHelper {
285
277
const ALLOW_UNSAFE : & ' static str = "allow_unsafe" ;
286
278
@@ -297,7 +289,7 @@ impl MarkdownHelper {
297
289
if !options. compile . allow_dangerous_html && args. len ( ) > 1 {
298
290
if let Some ( arg) = args. get ( 1 ) {
299
291
if arg. value ( ) . as_str ( ) == Some ( Self :: ALLOW_UNSAFE ) {
300
- options. compile . allow_dangerous_html = true
292
+ options. compile . allow_dangerous_html = true ;
301
293
}
302
294
}
303
295
}
You can’t perform that action at this time.
0 commit comments