Skip to content

Commit

Permalink
Item14052: fixed implementation again
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Apr 20, 2016
1 parent a09d087 commit 39bf60c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/FilterPlugin.pm
Expand Up @@ -21,7 +21,7 @@ use warnings;

use Foswiki::Func();

our $VERSION = '4.21';
our $VERSION = '4.22';
our $RELEASE = '20 Apr 2016';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Substitute and extract information from content by using regular expressions';
Expand Down
6 changes: 4 additions & 2 deletions lib/Foswiki/Plugins/FilterPlugin/Core.pm
Expand Up @@ -426,7 +426,7 @@ sub handleMakeIndex {
# create an anchor to this group
my $anchor = '';
if ($theGroup =~ /\$anchor/) {
$anchor = $this->getAnchorName($group);
$anchor = $this->getAnchorName(transliterate($group, \%map));
if ($anchor) {
push @anchors, {
name=>$anchor,
Expand Down Expand Up @@ -755,12 +755,14 @@ sub transliterate {

# apply own decoding if present
if ($map) {
my $found = 0;
foreach my $pattern (keys %$map) {
my $replace = $map->{$pattern} || '';
if ($string =~ s/$pattern/$replace/g) {
return $string;
$found = 1;
}
}
return $string if $found;
}

$string = Text::Unidecode::unidecode($string);
Expand Down

0 comments on commit 39bf60c

Please sign in to comment.