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

Support for Vue Single File Components (SFCs) #82

Closed
benlind opened this issue Mar 22, 2018 · 4 comments
Closed

Support for Vue Single File Components (SFCs) #82

benlind opened this issue Mar 22, 2018 · 4 comments

Comments

@benlind
Copy link

benlind commented Mar 22, 2018

Rewrap does not wrap comments correctly when they are in the <script> section of Vue Single File Components.

If I have this file:

// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi ac viverra eleifend.
console.log('These lines')
console.log('have the same')
console.log('indentation level')

...and execute Rewrap with my cursor in the comment, I get:

// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi
ac viverra eleifend. console.log('These lines') console.log('have the same')
console.log('indentation level')

Rewrap wraps any code on the same indentation level with the comment. And it doesn't add // before each line.

It would be great if this was supported. Thanks!

@stkb
Copy link
Owner

stkb commented Mar 22, 2018

Yeah this is just what happens when the document type isn't supported. I'll take it a look at this tomorrow but I think it should be easy.

stkb added a commit that referenced this issue Mar 23, 2018
@stkb
Copy link
Owner

stkb commented Mar 23, 2018

Hi, could you try downloading & installing the latest beta version from https://github.com/stkb/Rewrap/releases/tag/v1.8.1-beta1? Thanks!

@benlind
Copy link
Author

benlind commented Mar 23, 2018

Looks like it's working perfectly. Thanks for the quick work!

@stkb
Copy link
Owner

stkb commented Mar 23, 2018

Great! Thanks.

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

2 participants