We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7064704 commit 53a8693Copy full SHA for 53a8693
scripts/sipify.pl
@@ -133,8 +133,20 @@ sub processDoxygenLine {
133
if ( $line =~ m/\\since .*?([\d\.]+)/i ) {
134
return ".. versionadded:: $1\n";
135
}
136
- if ( $line =~ m/\\see (.*)/ ) {
137
- return ".. seealso:: $1\n";
+ if ( $line =~ m/\\see +(\w+(\.\w+)*(\(\))?)/ ) {
+ my $seealso = $1;
138
+ if ( $seealso =~ m/^Qgs[A-Z]\w+$/ ) {
139
+ return ".. seealso:: :py:class:`$seealso`\n";
140
+ }
141
+ elsif ( $seealso =~ m/^(Qgs[A-Z]\w+)\.(\w+(\(\))?)$/ ) {
142
+ return ".. seealso:: :py:func:`$1.$2`\n";
143
144
+ elsif ( $seealso =~ m/^[a-z]\w+(\(\))?$/ ) {
145
+ return ".. seealso:: :py:func:`$seealso`\n";
146
147
+ else {
148
+ return ".. seealso:: $seealso\n";
149
150
151
if ( $line =~ m/[\\@]note (.*)/ ) {
152
return ".. note::\n\n $1\n";
0 commit comments