3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-02 01:18:40 +02:00
pbot/applets/compiler_vm/Diff.pm
Pragmatic Software 3d97dc2c33 Rename "modules" to "applets"
"Applet" is a much better name for the external command-line
scripts and programs that can be loaded as PBot commands. They
will no longer be confused with Perl modules.

https://en.wikipedia.org/wiki/Applet
2021-11-19 18:05:50 -08:00

45 lines
831 B
Perl

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
package Diff;
use strict;
use HTML::Entities qw(encode_entities);
use vars qw($VERSION @ISA);
$VERSION = '0.08';
@ISA = qw(Text::WordDiff::Base);
sub new {
my ($class, %conf) = @_;
return bless \%conf, $class;
}
sub file_header {
my $header = shift->SUPER::file_header(@_);
return '' unless $header;
return $header;
}
sub hunk_header { return '' }
sub hunk_footer { return '' }
sub file_footer { return '' }
sub same_items {
shift;
return join '', @_;
}
sub delete_items {
shift;
return '<del>' . (join'', @_ ) . '</del>';
}
sub insert_items {
shift;
return '<ins>' . ( join'', @_ ) . '</ins>';
}
1;