Skip to content

Commit 311a775

Browse files
authored
Ensure ecosystem project errors are properly fenced (astral-sh#8516)
Fixes bug where errors could be unfenced resulting in hidden remaining content e.g. astral-sh#8508 (comment)
1 parent 5e2bb8c commit 311a775

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

python/ruff-ecosystem/ruff_ecosystem/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def markdown_check_result(result: Result) -> str:
200200
lines.extend(
201201
markdown_project_section(
202202
title="error",
203-
content=f"```\n{error}```",
203+
content=f"```\n{str(error).strip()}\n```",
204204
options=project.check_options,
205205
project=project,
206206
)

python/ruff-ecosystem/ruff_ecosystem/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def markdown_format_result(result: Result) -> str:
8484
lines.extend(
8585
markdown_project_section(
8686
title="error",
87-
content=f"```\n{error}```",
87+
content=f"```\n{str(error).strip()}\n```",
8888
options=project.format_options,
8989
project=project,
9090
)

0 commit comments

Comments
 (0)