Skip to content

Commit b99ba6f

Browse files
Kut Akdoganclaude
andcommitted
Support literal \n in label strings for multiline labels
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d1a0a39 commit b99ba6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shots/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _parse_shot(s: dict[str, Any], ctx: str) -> ShotSpec:
6565
viewport_preset=str(s["viewport_preset"]).strip() if s.get("viewport_preset") else None,
6666
viewport={k: int(v) for k, v in viewport.items()} if viewport else None,
6767
full_page=bool(s["full_page"]) if "full_page" in s else None,
68-
label=str(s["label"]).strip() if s.get("label") else None,
68+
label=str(s["label"]).strip().replace("\\n", "\n") if s.get("label") else None,
6969
)
7070

7171

@@ -129,7 +129,7 @@ def load_config(path: str) -> RunConfig:
129129
id=gid,
130130
shots=shots,
131131
output=output,
132-
label=str(g["label"]).strip() if g.get("label") else None,
132+
label=str(g["label"]).strip().replace("\\n", "\n") if g.get("label") else None,
133133
label_date=bool(g.get("label_date", False)),
134134
folder=str(g["folder"]).strip() if g.get("folder") else None,
135135
))

0 commit comments

Comments
 (0)