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
Preview style unnecessarily moves comment #3924
Comments
This seems to be happening also with the stable style. Should it still be considered as a bug?
|
It doesn't happen in the stable style. You may have a configuration file that sets |
Hmm, couldn't find the configuration, but a clean container install proves you are correct. I can try and take a look at this issue. |
1 similar comment
Hmm, couldn't find the configuration, but a clean container install proves you are correct. I can try and take a look at this issue. |
|
This is proving to be a bit tricky. Touching implicitly concatenated strings with comments on any line could change the semantics of the comment. The safest approach would be to not transform such strings at all and hold onto the integrity of the comment. Currently the logic goes like this:
I think we should either accept this, or then having a comment on any line "a" – "c" should skip processing for the whole string. Any thoughts? |
We probably should just keep your example code unchanged. If the user put a comment next to part of the string, we should keep it there. Though note that we currently merge the comments if the different lines hold non-strings instead:
That's a behavior I'd be open to changing. |
A fix proposal in this PR, let me know what you think! I can take a look at the non-string case in another PR if you think it is worth the time. |
Thanks for the fix! |
The preview style moves a comment on one line of an implicitly concatenated string to a different line.
The text was updated successfully, but these errors were encountered: