File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -423,17 +423,14 @@ def run(self):
423
423
424
424
search_params = search_params_parser (self .options .pop ("search_params" , False ))
425
425
426
- new_tab = self .options .pop ("new_tab" , False )
427
-
428
426
# We first check the global config, and then the per-directive
429
- # option. It defaults to true for backwards compatibility.
430
- execute = self .options .pop ("execute" , None )
431
- if execute is None :
432
- execute = str (self .env .config .replite_auto_execute ).lower ()
433
- else :
434
- execute = execute .lower ()
427
+ # option. It defaults to True for backwards compatibility.
428
+ execute = self .options .pop ("execute" , str (self .env .config .replite_auto_execute ))
435
429
436
- if execute == "false" :
430
+ if execute not in ("True" , "False" ):
431
+ raise ValueError ("The :execute: option must be either True or False" )
432
+
433
+ if execute == "False" :
437
434
self .options ["execute" ] = "0"
438
435
439
436
content = self .content
@@ -445,6 +442,8 @@ def run(self):
445
442
os .path .dirname (self .get_source_info ()[0 ]),
446
443
)
447
444
445
+ new_tab = self .options .pop ("new_tab" , False )
446
+
448
447
if new_tab :
449
448
directive_button_text = self .options .pop ("new_tab_button_text" , None )
450
449
if directive_button_text is not None :
You can’t perform that action at this time.
0 commit comments