https://bugs.kde.org/show_bug.cgi?id=464690
Bug ID: 464690 Summary: Spell checking is confused by Python format strings Classification: Applications Product: kate Version: 22.08.2 Platform: Other OS: Linux Status: REPORTED Severity: minor Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: silverunicorn2...@yandex.ru Target Milestone: --- SUMMARY When Kate encounters a format string like “f'Some {1} things'”, it highlights the “f'Some” part as misspelled as if the “f'” prefix was part of the first word. It is not very consistent though, e.g. I have two instances of “mbox.setText(f'Can’t ...” and in one place it highlights “f'Can’t” while in the other, it highlights “f'Can” only. Note that it works well with regular quoted strings. STEPS TO REPRODUCE 1. Open Kate or KWrite 2. Create new document 3. Set the document type to Python (saving it as .py does that as well IIUC) 4. Type (not paste) “var = f'Some thing theree'” (without outer quotes) (pasting may not trigger the spell check) OBSERVED RESULT “f'Some” and “theree” highlighted as misspelled. EXPECTED RESULT Only “theree” is highlighted as misspelled. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.26.3 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 ADDITIONAL INFORMATION The behavior seems to be the same as with plaintext documents where it IS expected. Also, using “f"” instead of “f'” seems to help. -- You are receiving this mail because: You are watching all bug changes.