-
Notifications
You must be signed in to change notification settings - Fork 11
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
New code at beginning of file should be inserted after BOM #234
Comments
Can you provide a minimal reproduction with an input file and migrator invocation that causes this error? Also, is everything entirely running within Windows, or are you using a tool like WSL, or any other intermediate tools that could be messing with the file format? |
Are you looking for me to provide something you can use to reproduce the issue? I'm sorry, but I don't fully understand what you are needing. If it's helpful, I ran As to your second question, I was using bash inside of Cmder (I prefer bash commands over Windows commands), so I thought there could be something there. However, I tried running sass-migrator with Command Prompt and still got the same issue. I took my existing files and copied them to a temp folder before running it. Other than that, the only tools I used were Command Prompt and then VS Code to look at the files. Below is a screenshot of how VS Code interprets the invisible character. |
This I guess the sass-migrator should ensure that if a file starts with a BOM, it inserts the use statement after it rather than before it. The BOM needs to stay the first thing in the file. |
Operating System
Windows 10
Sass Version
1.55.0 (compiled with dart2js 2.18.1)
Migrator Version
1.7.1 (compiled with dart2js 2.18.0)
After using the migrator on a large number of files, I encountered a bug when it came to the styles on my home page. I dug into it and turns out when the migrator tool inserts the use rule it injected some sort of hidden character along with the line break (see screenshot).
I am on Windows, so perhaps this is due to some sort of discrepancy with the line breaks between operating systems? Visual Studio does notify me on each file that the line endings are inconsistent; however, no matter what option I choose I still get this invisible character.
Fwiw, there's no urgency to fix this. I just went through all of my files and deleted that character before each rule.
The text was updated successfully, but these errors were encountered: