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

feat(fmt): support vto and njk extensions #25831

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

oscarotero
Copy link
Contributor

Fixes #25802

markup_fmt plugin supports some HTML-like formats like Angular, Jinja, Twig, Nunjucks or Vento, that are not supported by deno fmt. This PR adds support for the extensions njk (Nunjucks) and vto (Vento). Angular doesn't have a custom extension (it uses html afaik) and Jinja and Twig are template engines written in Python and PHP respectively so it doesn't make sense to be supported by Deno.

@CLAassistant
Copy link

CLAassistant commented Sep 23, 2024

CLA assistant check
All committers have signed the CLA.

@lucacasonato
Copy link
Member

Can you rebase and add a test like the one in tests/specs/fmt/yaml/__test__.jsonc?

@oscarotero
Copy link
Contributor Author

Sorry for the number of commits. I messed up a little. I your prefer a new cleaner PR, no problem.

I've added the test files, let me know if it's okay (in the yaml example, there's the badly formatted file but not the fixed formatted to compare).

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dsherret dsherret changed the title feat(fmt) Support vto and njk extensions feat(fmt): support vto and njk extensions Sep 23, 2024
@dsherret dsherret merged commit 1287739 into denoland:main Sep 23, 2024
17 checks passed
@oscarotero oscarotero deleted the fmt/vto-njk branch September 23, 2024 18:29
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.

Add more formats to markup_fmt
4 participants