Skip to content

Commit e0be21e

Browse files
committed
Disallow / or . in output-base-name
1 parent 86fb167 commit e0be21e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,11 @@ def _parse_srcset(entries):
640640
def check_output_base_name(env, output_base):
641641
docname = env.docname
642642

643+
if '.' in output_base or '/' in output_base:
644+
raise PlotError(
645+
f"The output-base-name '{output_base}' is invalid. "
646+
f"It must not contain dots or slashes.")
647+
643648
for d in env.mpl_custom_base_names:
644649
if output_base in env.mpl_custom_base_names[d]:
645650
if d == docname:

0 commit comments

Comments
 (0)