We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45fb373 commit a990ab8Copy full SHA for a990ab8
src/py/kaleido/_fig_tools.py
@@ -91,7 +91,9 @@ def to_spec(figure, layout_opts):
91
92
def _next_filename(path, prefix, ext):
93
default = 1 if (path / f"{prefix}.{ext}").exists() else 0
94
- re_number = re.compile(r"^" + prefix + r"-(\d+)\." + ext + r"$")
+ re_number = re.compile(
95
+ r"^" + re.escape(prefix) + r"\-(\d+)\." + re.escape(ext) + r"$",
96
+ )
97
numbers = [
98
int(match.group(1))
99
for name in path.glob(f"{prefix}-*.{ext}")
0 commit comments