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 {
267267}
268268
269269/// Helper to render markdown with configurable options
270+ #[ derive( Default ) ]
270271struct MarkdownHelper {
271272 allow_dangerous_html : bool ,
272273 allow_dangerous_protocol : bool ,
273274}
274275
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-
284276impl MarkdownHelper {
285277 const ALLOW_UNSAFE : & ' static str = "allow_unsafe" ;
286278
@@ -297,7 +289,7 @@ impl MarkdownHelper {
297289 if !options. compile . allow_dangerous_html && args. len ( ) > 1 {
298290 if let Some ( arg) = args. get ( 1 ) {
299291 if arg. value ( ) . as_str ( ) == Some ( Self :: ALLOW_UNSAFE ) {
300- options. compile . allow_dangerous_html = true
292+ options. compile . allow_dangerous_html = true ;
301293 }
302294 }
303295 }
You can’t perform that action at this time.
0 commit comments