package xm::umlaut;
use strict;
use xm::o;
"
will look for twochar markup, then look into xm{umlaut}, and if
found there, replace the umlaut with the coresponding text.
"}
$xm{umlaut} =
{
ae => "ä", Ae => "Ä",
ee => "ë", Ae => "Ë",
oe => "ö", Oe => "Ö",
ue => "ü", Ue => "Ü",
ss => "ß", Ss => "ss", SS => "SS",
ai => "á", Ai => "Á",
ei => "é", Ei => "É",
oi => "ó", Oi => "Ó",
ui => "ú", Ui => "Ú",
yi => "ý", Yi => "Ý",
mu => "µ", Yi => "Ý",
};
my $in = shift;
my $x = sub {
my ($a,$b,$c) = @_;
return $a.$b.$c if not exists $xm{umlaut}{$b};
return $xm{umlaut}{$b};
};
$in =~ s{(<)(\w.)(>)} {&$x($1,$2,$3)}gsex;
return $in;
}
return xm::o::args_stdin(@_, DESC); }
return DO(xm::o::args_stdin(@_, DESC)); }
1;