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

add: support for jinja ext #406

Merged
merged 1 commit into from
Aug 13, 2023
Merged

add: support for jinja ext #406

merged 1 commit into from
Aug 13, 2023

Conversation

thearchitector
Copy link
Contributor

@thearchitector thearchitector commented Aug 6, 2023

Many editors and tools look for the .html.jinja extension in order to provide formatting, color highlighting, styling, intellisense, etc. To support those use cases, don't try to append the .html extension to templates that already specify the .jinja extension, and also do autoescaping for .jinja files.

I'm also open to making it ignore only .html.jinja instead of just .jinja, but that would force folks into using .jinja.html instead, which feels like an incorrect ext.

@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (011d1ac) 97.57% compared to head (0f4e301) 97.57%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #406   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files          66       66           
  Lines        6256     6256           
=======================================
  Hits         6104     6104           
  Misses        152      152           
Files Changed Coverage Δ
blacksheep/server/rendering/jinja2.py 98.57% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RobertoPrevato RobertoPrevato merged commit 9cf0116 into Neoteroi:main Aug 13, 2023
10 checks passed
@RobertoPrevato
Copy link
Member

RobertoPrevato commented Aug 21, 2023

Hi @thearchitector
I made .jinja the default extension for templates - I just released 2.0a10 which includes your contribution, and updated the MVC project template accordingly.

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

Successfully merging this pull request may close these issues.

3 participants