diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/syntax_rules/python.syntax | 2 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/tests/test.py | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/python.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/python.syntax index f6973603..6690d98c 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/python.syntax +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/python.syntax @@ -38,7 +38,7 @@ }, { "name": "numbers", - "regex" : "\\b[0-9\\.]+\\b", + "regex" : "\\b[0-9]+\\.?[0-9]*\\b", "foreground": "colors/altkeyword" }, { diff --git a/src-qt5/desktop-utils/lumina-textedit/tests/test.py b/src-qt5/desktop-utils/lumina-textedit/tests/test.py new file mode 100644 index 00000000..cfac4984 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-textedit/tests/test.py @@ -0,0 +1,17 @@ +import math + +primes = [2] +print(2, end=' ') +count = 1; +for i in range(3, 200000): + for j in primes: + if i % j == 0: + break + elif j > math.sqrt(i): + count += 1 + print(i, end=' ') + if count % 5 == 0: + print() + primes.append(i) + break +print() |