mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-30 01:04:57 +02:00
Fix Python FunctionList absorbing next function issue if space after colon
Allow spaces between ':' and EOL. Fix #16636, close #16637
This commit is contained in:
parent
8435308b02
commit
1911875411
@ -0,0 +1,11 @@
|
||||
def func1(a,b):
|
||||
pass
|
||||
|
||||
def func2(a,b):
|
||||
pass
|
||||
|
||||
def func3(a,b):
|
||||
pass
|
||||
|
||||
def func4(a,b):
|
||||
pass
|
@ -0,0 +1 @@
|
||||
{"leaves":["func1(a,b)","func2(a,b)","func3(a,b)","func4(a,b)"],"root":"unitTest"}
|
@ -0,0 +1 @@
|
||||
{"leaves":["func1(a,b)","func2(a,b)","func3(a,b)","func4(a,b)"],"root":"unitTest"}
|
@ -22,7 +22,7 @@
|
||||
<nameExpr expr="\w+(?=\s*[\(|:])" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="\s(async )?def\x20\K.+?(?=(:$|,$|:\s*#))"
|
||||
mainExpr="\s(async )?def\x20\K.+?(?=(:\h*$|,\h*$|:\s*#))"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr=".*" />
|
||||
@ -30,7 +30,7 @@
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="^(async )?def\x20\K.+?(?=(:$|,$|:\s*#))"
|
||||
mainExpr="^(async )?def\x20\K.+?(?=(:\h*$|,\h*$|:\s*#))"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr=".*" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user