On Mon, 13 Aug 2018 13:09:53 +0200 Agustin Henze <[email protected]> wrote: > On Wed, 25 Jul 2018 12:04:01 +0200 Agustin Henze <[email protected]> wrote: > [...] > > I'm struggling to get a debian/watch rule to fetch new upstream releases of > > gcc-arm-none-eabi... It seems that uscan is getting some trouble with the > > href > > I need to match, they appear to be empty which is not true. Just please see > > on > > the paste[0] what I'm talking about. > > I have to admit that the href are totally weird with spaces and a lot of > > strange characters... But I think it should handle this case. > > > > Thanks in advance, > > > > [0] https://paste.debian.net/1034027/ > > Ok, I've tried locally removing the part `data-eula-href=""` from the href and > it works. I have no clue why uscan is dropping the entire href because of > this... But it seems to be valuable information to get the bug fixed.
Please review if this patch is ok for apply, it should work ok as far as I
understand. But it'd be good if someone with experience on perl, regex and
uscan review it carefully.
--- /usr/bin/uscan 2018-08-13 15:12:31.374367891 +0200
+++ uscan 2018-08-13 15:12:27.758379028 +0200
@@ -3294,7 +3294,7 @@
uscan_verbose "Matching pattern:\n @patterns\n";
}
my @hrefs;
- while ($content =~ m/<\s*a\s+[^>]*href\s*=\s*([\"\'])(.*?)\1/sgi) {
+ while ($content =~ m/<\s*a[^>]*\s+href\s*=\s*([\"\'])(.*?)\1/sgi) {
my $href = $2;
my $mangled_version;
$href = fix_href($href);
The modified regex forces to recognize that before href there is a space in
contrast with the previous regex which matches for example with
something-weird-href="" which is not ok.
--
TiN
signature.asc
Description: OpenPGP digital signature

