SUMMARY Python HL does not correctly highlight octal numbers. STEPS TO REPRODUCE 1. Enter some text with an octal number, e.g. 'x = 0o07' 2. Execute the command 'set-highlight Python' OBSERVED RESULT Everything after the initial '0' is mis-highlighted. EXPECTED RESULT Octal number should be highlighted like a hexadecimal number. SOFTWARE/OS VERSIONS Katepart: 5.64.0 HL: 2.22 ADDITIONAL INFORMATION My initial reaction was to fix this in the HL, but I see that is just using HlCOct. I wonder if it makes more sense to fix (or add an option to?) that instead?
The HlCOct rule is equivalent to "\b0[0-7]+". I corrected the numbers in: https://phabricator.kde.org/D25869
Git commit 8ca7064781a328b33b2cd79668e876719f1cc762 by Nibaldo González. Committed on 13/12/2019 at 02:22. Pushed by ngonzalez into branch 'master'. Python: improve numbers, add octals, binaries and "breakpoint" keyword Summary: FIXED-IN: 5.66.0 **Changes:** * Improve number detection with underscores. Add binaries and octales. (I took the regular expressions from the TypeScript highlighting file and adapted them to Python). See: https://www.python.org/dev/peps/pep-0515/ * Add keyword "breakpoint" introduced in Python 3.7: https://www.python.org/dev/peps/pep-0553/ Reviewers: #framework_syntax_highlighting, dhaumann, cullmann Reviewed By: #framework_syntax_highlighting, dhaumann Subscribers: kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D25869 M +32 -0 autotests/folding/test.py.fold M +36 -4 autotests/html/test.py.html M +32 -0 autotests/input/test.py M +36 -4 autotests/reference/test.py.ref M +21 -16 data/syntax/python.xml https://commits.kde.org/syntax-highlighting/8ca7064781a328b33b2cd79668e876719f1cc762