Skip to content

Commit 570cdfa

Browse files
committed
fix: strip CRLF from frontmatter block in command composition
Use rstrip('\r\n') instead of rstrip('\n') when constructing fm_block so CRLF line endings don't leave trailing \r in the reattached frontmatter fences.
1 parent c18b5ec commit 570cdfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/specify_cli/presets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2463,7 +2463,7 @@ def _split_frontmatter(text: str) -> tuple:
24632463
if fence_end == -1:
24642464
return None, text
24652465

2466-
fm_block = "".join(lines[:fence_end + 1]).rstrip("\n")
2466+
fm_block = "".join(lines[:fence_end + 1]).rstrip("\r\n")
24672467
body = "".join(lines[fence_end + 1:])
24682468
return fm_block, body
24692469

0 commit comments

Comments
 (0)