Skip to content

Commit

Permalink
Enhance Function List for Python
Browse files Browse the repository at this point in the history
Support for async def and colons in argument list

Fix notepad-plus-plus#13908, close notepad-plus-plus#14628
  • Loading branch information
sherdim authored and donho committed Feb 7, 2024
1 parent c6e433f commit e600c35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PowerEditor/installer/functionList/python.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
<nameExpr expr="\w+(?=\s*[\(|:])" />
</className>
<function
mainExpr="\sdef\x20\K.+?(?=:)"
mainExpr="\s(async )?def\x20\K.+?(?=(:$|,$|:\s*#))"
>
<functionName>
<funcNameExpr expr=".*" />
</functionName>
</function>
</classRange>
<function
mainExpr="^def\x20\K.+?(?=:)"
mainExpr="^(async )?def\x20\K.+?(?=(:$|,$|:\s*#))"
>
<functionName>
<nameExpr expr=".*" />
</functionName>
</function>
</parser>
</functionList>
</NotepadPlus>
</NotepadPlus>

0 comments on commit e600c35

Please sign in to comment.