diff --git a/python/ruff-ecosystem/ruff_ecosystem/check.py b/python/ruff-ecosystem/ruff_ecosystem/check.py index 5270a97e43..2e996ff006 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/check.py +++ b/python/ruff-ecosystem/ruff_ecosystem/check.py @@ -200,7 +200,7 @@ def markdown_check_result(result: Result) -> str: lines.extend( markdown_project_section( title="error", - content=f"```\n{error}```", + content=f"```\n{str(error).strip()}\n```", options=project.check_options, project=project, ) diff --git a/python/ruff-ecosystem/ruff_ecosystem/format.py b/python/ruff-ecosystem/ruff_ecosystem/format.py index be6a90f5b4..f639150a86 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/format.py +++ b/python/ruff-ecosystem/ruff_ecosystem/format.py @@ -84,7 +84,7 @@ def markdown_format_result(result: Result) -> str: lines.extend( markdown_project_section( title="error", - content=f"```\n{error}```", + content=f"```\n{str(error).strip()}\n```", options=project.format_options, project=project, )