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 mis-typed extensions. #9247

Closed
blueforesticarus opened this issue Dec 12, 2023 · 1 comment
Closed

Improve error message on mis-typed extensions. #9247

blueforesticarus opened this issue Dec 12, 2023 · 1 comment

Comments

@blueforesticarus
Copy link

Describe your proposed improvement and the problem it solves.
If you try to use a pandoc extension that doesn't exist (ex. inline_note instead of inline_notes), it tells you it "isn't supported for markdown".

$ pandoc -f markdown+inline_note 
The extension inline_note is not supported for markdown

This is highly misleading, since it seems to imply that inline_note is supported for some other format.

This is not good.

  1. A user could easily mistype and end up thinking markdown doesn't support inline_notes (or other feature) at all, and give up.
  2. A user (me) could assume this was a commonmark vs markdown thing, going down a wild goose chase.

A better alternative would be to check which formats do have the requested extension, and inform the user of those.
If the extension does not exist for any format, the error message should state that it does not exist.

Describe alternatives you've considered.

@tarleb
Copy link
Collaborator

tarleb commented Apr 30, 2024

The error message now reads

The extension inline_note is not supported for markdown.
Use --list-extensions=markdown to list supported extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants