Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 429a7c21

Von Moritz Bunkus vor etwa 3 Jahren hinzugefügt

  • ID 429a7c2179e2c3c4fe9bfcbb52ebb22e55c8519a
  • Vorgänger c4ad3f66
  • Nachfolger 502a10d4

MT940: Multi-Line-Varianten von Tag 86 unterstützen

Unterschiede anzeigen:

SL/MT940.pm
37 37
    }
38 38
  };
39 39

  
40
  my ($active_field);
40 41
  foreach my $line (read_file($file_name)) {
41 42
    chomp $line;
42 43
    $line = Encode::decode('UTF-8', $line);
43 44
    $line =~ s{\r+}{};
44 45
    $line_number++;
45 46

  
47
    my $current_field;
48
    if ($line =~ m{^:(\d+[a-z]*):}i) {
49
      $current_field = $1;
50
      $active_field  = $1;
51
    }
52

  
46 53
    if (@lines && ($line =~ m{^\%})) {
47 54
      $lines[-1]->[0] .= substr($line, 1);
48 55

  
56
    } elsif (@lines && ($active_field eq '86') && !$current_field) {
57
      $lines[-1]->[0] .= $line;
58

  
49 59
    } else {
50 60
      push @lines, [ $line, $line_number ];
51 61
    }

Auch abrufbar als: Unified diff