-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug] Auto formatting does not work if there is an 'R "===== (' in the sketch? #10946
Comments
There is a bug report about it here in the repository of the Artistic Style tool used by the Arduino IDE's Auto Format feature: https://sourceforge.net/p/astyle/bugs/519/ |
Interestingly, it may be better for the user to leave this type of variable in an additional file, such as index.h,
And thus can also use an online formatter to improve the reading of the code: https://www.freeformatter.com/html-formatter.html
|
I asked in the post when a new version of this software will be released, thanks! |
I add that in other parts of the code, when this bug appears it puts extra spaces before / after the slash character "/" if they are surrounded by quotes. For example "one/two" gets transformed to "one / two" even if is in a statement 50 lines away. |
Hi @rtek1000. There is some good news related to this bug. #11543 will change the Arduino IDE from using the Artistic Style formatter to ClangFormat, which is able to handle raw string literals correctly. ClangFormat is very popular and actively developed, and even suggested by the Artistic Style developer in this statement where they state that they are no longer able to play as active a role in developing Artistic Style. You can give the test build for the ClangFormat/Arduino IDE integration a try. The downloads are available here: |
Hi,
Auto formatting (Ctrl+T) does not work if there are:
But Auto formatting works if there is no line break:
In both cases the compilation is successful.
Arduino IDE 1.8.13 (Linux)
The text was updated successfully, but these errors were encountered: