Changeset 11994 in josm for trunk/scripts/presets_lang.pl


Ignore:
Timestamp:
2017-04-24T11:39:15+02:00 (2 years ago)
Author:
stoecker
Message:

fix #14685 - wiki language link extractor fails for URL's with equal beginning, drop old workaround

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/presets_lang.pl

    r11669 r11994  
    3737      my $h = uri_unescape($data{href});
    3838      my $v = "href=\"$h\"";
    39       if($h eq "http://wiki.openstreetmap.org/wiki/Proposed_features/House_numbers/Karlsruhe_Schema")
    40       {
    41         $datan{"de"} = "/wiki/Proposed_features/De:Hausnummern";
    42       }
    4339      while($main =~ /<a href="(\/wiki\/[^"]+)"[^>]+><b>·<\/b> <bdi lang="([a-z_A-Z-]+)"(?: style="unicode-bidi:embed;unicode-bidi:-webkit-isolate;unicode-bidi:isolate")?>/g)
    4440      {
     
    6965      }
    7066      print "$v\n";
    71       print "Replace failed for $data{href}.\n" if !($file =~ s/(<link )href="\Q$data{href}\E.*?( ?\/>)/$1$v$2/s);
     67      print "Replace failed for $data{href}.\n" if !($file =~ s/(<link )href="\Q$data{href}\E".*?( ?\/>)/$1$v$2/s);
    7268
    7369      $skip++;
Note: See TracChangeset for help on using the changeset viewer.