#!/usr/bin/perl

use strict;
use warnings;

my $t_1=$ARGV[0] // '';
##  first argument
if(not -f $t_1) {
  print "I need a template file as the first argument\n";
  exit;
}
my $t_2=$ARGV[1] // '';
if(not -f $t_2) {
  print "I need a file as the second argument\n";
}

foreach my $line (`diff -w $t_1 $t_2`) {
  chomp $line;
  if($line=~m|←|) {
    next;
  }
  if($line=~m|\s*<!--|) {
    next;
  }
  if($line=~m|\d+[ad]\d+$|) {
    next;
  }
  print "$line\n";
}

exit;
