Skip to content

Remove leading space from keywords.txt identifier #48

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

Merged
merged 1 commit into from
Aug 3, 2018
Merged

Remove leading space from keywords.txt identifier #48

merged 1 commit into from
Aug 3, 2018

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 3, 2018

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 thomasfredericks merged commit f5203d0 into thomasfredericks:master Aug 3, 2018
@thomasfredericks
Copy link
Owner

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

@per1234
Copy link
Contributor Author

per1234 commented Aug 3, 2018

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: arduino/Arduino#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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants