in reply to Limit substitution in html parsing

I'm not sure you'll find many people kind enough to wade through those unreadable text blobs to find the differences between them. Naturally if anyone really wants to do it he would copy the html texts into two files and run 'diff' on them. But I think you would get much more cooperation if formatted the html and pruned down the example to the important parts or alternatively marked them.

UPDATE: Instead of using $text you might construct the tag yourself:

sub fix_umlaut { my ( $tagname, $attr, $text ) = @_; $output .= $text; if ( $tagname eq 'idx:orth' and $$attr{value} =~ s/[$um]/$replace{ +$1}/g ) { delete $$attr{'infl'}; $output .= '<idx:orth ' . map( " $_=\"".$$attr{$_}.'"',keys(%$ +attr)) . '/>'; # repeat the tag with modified umlauts } }