If typing "-1.09" (without the quotes), the "09" appears red and underlined. Seems as if anything matching /[-+][0-9]+/ causes number parsing to stop at the end of the pattern. Red/underlined after the black dot: -0.09 -1.08 -1.09 +1.09 -1.012345678 Anything matching /[-+][0-9]+\.0[0-7]*[89]/ Red/underlined before the black dot: -09.0 +09.0 Entire number red, except dot is black if present: -08.08 -1e3 +1e3 -1e1f 1f (invalid) Not red/underlined, but dot is black: -1.90 +1.90 -1.01234567 -1.09e1 -3.١٤١٥٩e1 (invalid) Not red/underlined, and dot is yellowish orange-brown like the rest of the number: 1.09 - 1.09 -.09 09.0 08.08 1e3 1e1f 3.١٤١٥٩e1 (invalid) ٣.١٤١٥٩ (invalid)
Indeed. The problem is that it seems the Octal rule matches due to the leading 0, and 9 is not part of the Octal system. Usually, the <Float ...> rule should match earlier, but this does not seem to work properly. Needs further investigation.
Git commit db2cbfd50c22da2e0dd633b6ae8f9dfd7babee11 by Dominik Haumann. Committed on 29/05/2018 at 20:56. Pushed by dhaumann into branch 'master'. Add unit test for C++ Octal number misdetection M +2 -0 autotests/folding/highlight.cpp.fold M +3 -1 autotests/html/highlight.cpp.html M +2 -0 autotests/input/highlight.cpp M +3 -1 autotests/reference/highlight.cpp.ref https://commits.kde.org/syntax-highlighting/db2cbfd50c22da2e0dd633b6ae8f9dfd7babee11
*** Bug 388091 has been marked as a duplicate of this bug. ***
What also does not work: const float min = -0.5f;
This is fixed for KDE Frameworks 5.49.