Remove leading space from keywords.txt identifier #48

Merged
per1234 merged 1 commits from keywords-separator into master 2018-08-03 22:14:50 +03:00
per1234 commented 2018-08-03 20:21:02 +03:00 (Migrated from github.com)

Each field of keywords.txt is separated by a single true tab. Leading spaces on a keyword identifier causes it to not be recognized by the Arduino IDE. On Arduino IDE 1.6.5 and newer an unrecognized keyword identifier causes the default editor.function.style highlighting to be used (as with KEYWORD2, KEYWORD3).

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords

Each field of keywords.txt is separated by a single true tab. Leading spaces on a keyword identifier causes it to not be recognized by the Arduino IDE. On Arduino IDE 1.6.5 and newer an unrecognized keyword identifier causes the default editor.function.style highlighting to be used (as with KEYWORD2, KEYWORD3). Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
thomasfredericks commented 2018-08-03 22:15:44 +03:00 (Migrated from github.com)

Thank you. It would be so much simpler if Arduino fixed this upstream as we are dealing with invisible characters here.

Thank you. It would be so much simpler if Arduino fixed this upstream as we are dealing with invisible characters here.
per1234 commented 2018-08-03 22:21:47 +03:00 (Migrated from github.com)

I set my editor to show tabs and spaces and installed a browser extension that shows them on GitHub pages. Now that they're not invisible to me anymore I find it much easier to deal with.

Incorrect use of whitespace in keywords.txt is a very common problem and so it would be reasonable for Arduino to make the keywords.txt format more flexible. Some effort was made: https://github.com/arduino/Arduino/pull/7245 in that direction but it seems to have stalled out so I'm not holding my breath. Personally, I don't find it so onerous to just comply with the specification.

I set my editor to show tabs and spaces and installed a [browser extension that shows them on GitHub pages](https://github.com/glebm/render-whitespace-on-github). Now that they're not invisible to me anymore I find it much easier to deal with. Incorrect use of whitespace in keywords.txt is a very common problem and so it would be reasonable for Arduino to make the keywords.txt format more flexible. Some effort was made: https://github.com/arduino/Arduino/pull/7245 in that direction but it seems to have stalled out so I'm not holding my breath. Personally, I don't find it so onerous to just comply with the specification.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Max/thomasfredericks_Bounce2#48