Package: irssi-scripts Version: 20060513 Severity: wishlist Tags: patch Hi,
here's a patch to make topic-diff.pl ignore changes in
leading/trailing whitespace (often occuring due to irssi's suboptimal
behavior on /t <tab>). Additionally, it will also recognize ' - ' as
separator between topic sections.
--- /usr/share/irssi/scripts/topic-diff.pl 2004-02-02 08:11:24.000000000
+0100
+++ ./topic-diff.pl 2005-02-24 01:01:57.579665512 +0100
@@ -30,8 +30,10 @@
# $server->print ($channel, $server->{tag});
if ($topics{$server->{tag}."_".$channel}) {
- my @original = split /\s*\|\s*/, $topics{$server->{tag}."_".$channel};
- my @modified = split /\s*\|\s*/, $topic;
+ $topics{$server->{tag}."_".$channel} =~ s/^ +| +$//g;
+ $topic =~ s/^ +| +$//g;
+ my @original = split /\s*\|\s*|\s+-\s+/,
$topics{$server->{tag}."_".$channel};
+ my @modified = split /\s*\|\s*|\s+-\s+/, $topic;
outer: while( $i <= $#original) {
(There is some annoyance that it converts ' - ' to ' | ' when showing the diff,
but that rarely happens without - being a separator.)
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-686
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Christoph
--
[EMAIL PROTECTED] | http://www.df7cb.de/
signature.asc
Description: Digital signature

