Skip to content

The engine flag is not reliable #9

@alerque

Description

@alerque

The --engine flag needs some help.

  1. It is never clear which backend was actually used. I have all the possible ones available on my system, but which one is actually used is a mystery. This is frustrating to debug in light of point 2. Some kind of debug flag should be introduced that notes what engine was actually used, probably to a message on stderr.

  2. Setting an bogus engine does not result in an error:

    ❯ pancritic -f markdown -t latex --critic-mode markup --engine aoeu - <<< "test"
    No output file extension nor to-format specified. Default to HTML.
    <p>test</p>

    Really, aoeu is a valid engine and scored me real output‽ But wait, the plot thickens. It didn't just ignore me outright on the invalid engine, something changed because if you leave off the flag off you get something else:

    ❯ pancritic -f markdown -t latex --critic-mode markup - <<< "test"
    No output file extension nor to-format specified. Default to HTML.
    
    <style>
    ....
    </style>
    <script>
    ....
    </script>
    
    
    <div id="wrapper">
    
    <p>test</p>
    
    </div>
    <p>test</p>

    Of course neither of these output are actually LaTeX (see To flag does not work as advertized #5), they are both HTML. But strangely one of them is just the inline content, the other is wrapped (as in this is almost a hack for Need option to not include wrapper #7).

    Setting an invalid engine should be an error. Falling back to something other than the one specified should be a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions