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

Auto formatter adds leading space and/or newline to rest-of-line comment #164

Closed
iannightingale opened this issue Oct 3, 2018 · 1 comment

Comments

@iannightingale
Copy link

Firstly, thanks for the great plugin! It has made soy development a lot more enjoyable.

I had a question surrounding auto formatting end-of-line comments. I've observed the following behavior:

{template .test}
   // Above soy block, has extra leading space but no newline.
  {if 1 == 1}

  {/if}

   // Above HTML, has extra leading space and extra line.

  <div></div>

  /* Working as intended. */
  {if 1 == 1}

  {/if}

  /* Working as intended. */
  <div></div>

{/template}

I know the Closure Template comments documentation mentions whitespace being required for end-of-line comments, but I don't believe it requires comments being misaligned/separated with the line they describe, as seen above.

This isn't a pressing issue as single-star comments seem to work as intended, but my preference would be to use end-of-line comments without superfluous and misaligned whitespace.

Thanks!

@crdev
Copy link
Collaborator

crdev commented Jan 21, 2020

This was fixed by #185

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

No branches or pull requests

3 participants