8000 Format & extension command-line handling · Issue #7797 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Format & extension command-line handling #7797
Closed
@not-my-profile

Description

@not-my-profile

The CLI around formats and extensions behaves in some unexpected ways.

Passing an unknown format or extension to -f or -t should make the command fail immediately instead of reading from stdin first (only to inevitably fail):

$ pandoc -f unknown_format
why do you let me write here?
^D
Unknown input format unknown_format
$ pandoc -t unknown_format
why do you let me write here?
^D
Unknown output format unknown_format

Running --list-extensions with a format that does not exist should return an error:

$ pandoc --list-extensions=unknown_format
-east_asian_line_breaks

Specifying an extension that doesn't exist for a format that doesn't exist should probably report an unknown format error (but currently reports an unknown extension error):

$ echo | pandoc -f a+b                             
Error parsing reader format "a+b": (line 1, column 4):
unexpected end of input
Unknown extension: b
$ echo | pandoc -t a+b
Error parsing writer format "a+b": (line 1, column 4):
unexpected end of input
Unknown extension: b

Pandoc version?
pandoc 2.16.2 on Linux

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0