do not create link for current class

This commit is contained in:
Denis Rouzaud 2017-12-19 11:43:12 -04:00
parent db8a7c613b
commit 36a05a3a0d

View File

@ -163,7 +163,11 @@ sub processDoxygenLine {
}
}
# create links in plain text too (less performant)
$line =~ s/\b(Qgs[A-Z]\w+)\b(\.?$|[^\w]{2})/:py:class:`$1`$2/g;
if ( $line =~ m/\b(Qgs[A-Z]\w+)\b(\.?$|[^\w]{2})/) {
if ( $1 !~ $ACTUAL_CLASS ) {
$line =~ s/\b(Qgs[A-Z]\w+)\b(\.?$|[^\w]{2})/:py:class:`$1`$2/g;
}
}
$line =~ s/\b(Qgs[A-Z]\w+\.[a-z]\w+\(\))(\.|\b|$)/:py:func:`$1`/g;
if ( $line =~ m/[\\@]note (.*)/ ) {
return "\n.. note::\n\n $1\n";