Skip to content

Use correct separator in keywords.txt#2

Merged
Floessie merged 1 commit intoFloessie:masterfrom
per1234:keywords-separ
Feb 5, 2018
Merged

Use correct separator in keywords.txt#2
Floessie merged 1 commit intoFloessie:masterfrom
per1234:keywords-separ

Conversation

@per1234
Copy link
Contributor

@per1234 per1234 commented Feb 4, 2018

The Arduino IDE currently requires the use of a tab separator between the name and identifier. Without this tab the keyword is not highlighted.

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

The Arduino IDE currently requires the use of a tab separator between the name and identifier. Without this tab the keyword is not highlighted.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
@Floessie
Copy link
Owner

Floessie commented Feb 4, 2018

Hi Per,

The Arduino IDE currently requires the use of a tab separator between the name and identifier.

Thanks for the pointer. I'll definitely integrate your PR. The statement above isn't completely true, tough: This is the "requirement" in the link you provided (highlighted by me):

A tab should be used to separate each name from the identifier.

It's just a should...

Without this tab the keyword is not highlighted.

This is definitely not true, at least with Arduino IDE 1.8.5 under Linux.

Best,
Flössie

@per1234
Copy link
Contributor Author

per1234 commented Feb 4, 2018

I just verified that with the Linux ARM version of the Arduino IDE as well as the Windows version a true tab separator is indeed required.

The keywords as shown in the Arduino IDE when your version of the library is installed (stop and yield are highlighted because they are present in other keywords.txt files):
space_separator
The keywords as shown in the Arduino IDE when my version of the library is installed:
tab_separator
It seems strange that the Linux version of the IDE works differently in this respect than Windows or Linux ARM. Are you maybe using a modified version of the Arduino IDE, such as one installed via a package manager?

@Floessie
Copy link
Owner

Floessie commented Feb 5, 2018

You're right! 😳 I was fooled by other keywords.txt files, that highlighted some of my keywords. I should have digged deeper.

Thanks,
Flössie

@Floessie Floessie merged commit 956734b into Floessie:master Feb 5, 2018
@per1234
Copy link
Contributor Author

per1234 commented Feb 5, 2018

Glad everything is cleared up now.

I have updated the wording of the library specification.

Note that in some future Arduino IDE release (probably 1.9.0), the tab requirement will be relaxed. I will update the specification at that time. However, it's not clear how far off that release is and (if history is any indication) people will still be using previous IDE versions for years after, especially since the new sketch preprocessor is likely to cause some breakage in the first releases.

@Floessie
Copy link
Owner

Floessie commented Feb 5, 2018

Absolutely. Thanks for the rewording. 👍

Best,
Flössie

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