google / vim-codefmt

Vim plugin for syntax-aware code formatting
Apache License 2.0
1.11k stars 114 forks source link

js-beautify support for mustache and handlebars #170

Closed abgeana closed 3 years ago

abgeana commented 3 years ago

The mustache/vim-mustache-handlebars plugin sets the filetype to either html.handlebars or html.mustache. Even though js-beautify supports formatting for these files, the --type parameter must be html.

This commit sets the --type parameter to html when the filetype matches the regex html\..*.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

abgeana commented 3 years ago

@googlebot I signed it!

abgeana commented 3 years ago

CI is still failing, but I see in the tests for js-beautify are fine this time. The problem is with another formatter I think.

dbarnett commented 3 years ago

CI is still failing, but I see in the tests for js-beautify are fine this time. The problem is with another formatter I think.

Interesting, looks like #167 and for some reason Travis never ran on that. I'll look into it.

EDIT: I have PR #171 to fix the test issues.

abgeana commented 3 years ago

I addressed the two changes you requested and also squashed the commits to make history nicer. Let me know if this works.

dbarnett commented 3 years ago

Thanks, merging!