diff --git a/scripts/sipify.pl b/scripts/sipify.pl index dea3d484464..0c2780f1ad4 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -242,9 +242,12 @@ sub processDoxygenLine { $FOUND_SINCE = 1; return "\n.. versionadded:: $1\n"; } - if ( $line =~ m/\\deprecated(.*)/i ) { + if ( $line =~ m/\\deprecated(?:\s+since\s+(?:QGIS\s+)(?[0-9.]+)(,\s*)?)?(?.*)?/i ) { $INDENT = ''; - return "\n.. deprecated::$1\n"; + my $depr_line = "\n.. deprecated::"; + $depr_line .= " QGIS $+{DEPR_VERSION}" if (defined $+{DEPR_VERSION}); + $depr_line .= "\n $+{DEPR_MESSAGE}\n" if (defined $+{DEPR_MESSAGE}); + return $depr_line; } # create links in see also