mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
3d97dc2c33
"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
45 lines
831 B
Perl
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;
|