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

The engine flag is not reliable #9

Open
alerque opened this issue Apr 5, 2019 · 0 comments
Open

The engine flag is not reliable #9

alerque opened this issue Apr 5, 2019 · 0 comments
Labels

Comments

@alerque
Copy link
Contributor

alerque commented Apr 5, 2019

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.

@ickc ickc added the bug label Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants