Skip to content

Commit

Permalink
strip interpunction from anchor text
Browse files Browse the repository at this point in the history
  • Loading branch information
gflohr committed Dec 13, 2023
1 parent fd7a442 commit 9cc2604
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Qgoda/HTMLFilter/CleanUp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ sub start {
return $chunk;
}

sub text {
my ($self, $chunk, %args) = @_;

my $interpunction = $self->{__interpunction};
if (length $interpunction) {
$chunk =~ s/[$interpunction]$//;
}

return $chunk;
}

sub end {
my ($self, $chunk, %args) = @_;

Expand Down

0 comments on commit 9cc2604

Please sign in to comment.