Is there an existing issue for this?
Description of the Issue
Post - #15529 I thought of an improved way to do Python smart-indent: use Scintilla to detect when a colon at the end of a line is styled as a comment, string, etc. Basically, require that its style be "operator" as the colon is defined as an operator in the Python language.
Describe the solution you'd like.
Rely on style context for determining next-line smart-indent, not a somewhat complicated regular expression.
Debug Information
Notepad++ v8.6.9 (64-bit)
Build time : Jul 12 2024 - 05:09:25
Path : C:\NotepadPlusPlus\Misc\_NoBackup\Releases\npp.8.6.9\npp.8.6.9.portable.x64\notepad++.exe
Command Line : -titleAdd="8.6.9 64-bit" -multiInst
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 11 Pro (64-bit)
OS Version : 23H2
OS Build : 22631.3880
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4)
PythonScript (3.0.18)
Anything else?
No response