Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve: Error message on failed AST check #463

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/mdformat/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,14 @@ def run(cli_args: Sequence[str]) -> int: # noqa: C901
print_error(
f'Could not format "{path_str}".',
paragraphs=[
"The formatted Markdown renders to different HTML than the input Markdown. " # noqa: E501
"This is likely a bug in mdformat. "
"Please create an issue report here, including the input Markdown: " # noqa: E501
"https://github.com/executablebooks/mdformat/issues",
"Formatted Markdown renders to different HTML than input Markdown. " # noqa: E501
"This is a bug in mdformat or one of its installed plugins. "
"Please retry without any plugins installed. "
"If this error persists, "
"report an issue including the input Markdown "
"on https://github.com/executablebooks/mdformat/issues. "
"If not, "
"report an issue on the malfunctioning plugin's issue tracker.",
],
)
return 1
Expand Down