1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

typos in keywords txt can break syntax highlighting

fixes #1269
This commit is contained in:
Federico Fissore 2013-02-11 11:30:38 +01:00
parent 5cebf99de5
commit f4cd50b8ac

View File

@ -98,7 +98,7 @@ public class PdeKeywords extends CTokenMarker {
//String htmlFilename = second.substring(tab + 1).trim();
String coloring = pieces[1].trim();
if (coloring.length() > 0) {
if (coloring.length() > 0 && Character.isDigit(coloring.charAt(coloring.length() - 1))) {
// text will be KEYWORD or LITERAL
boolean isKey = (coloring.charAt(0) == 'K');
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc