Ignore:
Timestamp:
08/15/16 19:50:20 (4 years ago)
Author:
ak19
Message:

Fix to recent commit (r30681-r30687) to work with escaped colons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gti.pl

    r30687 r30709  
    16541654    my ($chunk_text) = @_;
    16551655   
    1656     $chunk_text =~ s/\\:/ESCAPEDCOLONTEMP/g; # an escaped colon "\:" should only occur in the chunk_key portion of the line
     1656    $chunk_text =~ s/\\:/ESCAPEDCOLONTEMP/g; # an escaped colon "\:" should only occur in the chunk_key portion of the line.
     1657    # But it seems to occur in chunk text too now (before http:\\) in dictionary.properties.
    16571658
    16581659    # Simple: just remove string key   
    16591660    $chunk_text =~ s/^(\S+?)[:|=](\s*)//s;
     1661
     1662    if($chunk_key =~ m/ESCAPEDCOLONTEMP/) { # put back the escaped colons
     1663    $chunk_key =~ s/ESCAPEDCOLONTEMP/\\:/g;
     1664    }
     1665
    16601666    $chunk_text =~ s/(\s*)$//s;  # Remove any nasty whitespace, carriage returns etc.
    16611667    $chunk_text =~ s/(\s*)\#\s+Updated\s+(\d?\d-\D\D\D-\d\d\d\d.*)\s*$//is;
Note: See TracChangeset for help on using the changeset viewer.