Skip to content

Commit

Permalink
do not create link for current class
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Dec 19, 2017
1 parent db8a7c6 commit 36a05a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/sipify.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 36a05a3

Please sign in to comment.