Commit cfcc8645 authored by Alain Laporte's avatar Alain Laporte Committed by Christoph Cullmann
Browse files

More simpler regexp to match different class declarations

Tested class declarations:

class Philosopher:
class AustralianPhilosopher(Philosopher, default_name="Bruce"):
class Meta():
class MyClass(metaclass=Meta):
class MySubclass(MyClass):

Fix case where AustralianPhilosopher is not detected

ISSUE: #75

BUG: 454545
parent c2380042
......@@ -73,7 +73,7 @@ void KatePluginSymbolViewerView::parsePythonSymbols(void)
}
}
if (cl.indexOf(QRegularExpression(QLatin1String("^class [a-zA-Z0-9_,\\s\\(\\).]+:"))) >= 0) {
if (cl.indexOf(QRegularExpression(QLatin1String("^class [a-zA-Z0-9_]+(\\(.*\\))?:"))) >= 0) {
in_class = 1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment