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

For extension-based conversions, default template engines still process files handled by other template engines #176

Closed
jaredcwhite opened this issue Nov 1, 2020 · 0 comments · Fixed by #177
Labels
bug Something isn't working

Comments

@jaredcwhite
Copy link
Member

jaredcwhite commented Nov 1, 2020

When a file has template_engine: set explicitly in its front matter, all is well, but if it's determined based on extension alone, there's still some overlap. For example:

  • If the default template engine is Liquid, and you have an ERB file at .erb without setting template_engine:, it will still attempt to process through Liquid in addition to ERB (but only if it contains Liquid tags, because the Liquid converter does a conditional text inspection). That might be "fine" in the sense that you don't have any Liquid tags, but if you do as regular text (like in a code example), you'll be surprised that Liquid picks it up.
  • Same in reverse: if your default is ERB, and you have a .liquid file, it will process ERB tags alongside the Liquid processing, and that's a given because the ERB converter does not search the file for ERB tags conditionally (confused yet?!).

There's also an obscure bug that could potentially arise regarding output extensions…for example, if Liquid processes before some other converter that matches by mistake and that converter doesn't specify an .html extension explicitly, you'll get .liquid output instead which is bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant