[Codestriker-commits] CVS update: codestriker/lib/Codestriker/Http HighlightLineFilter.pm
Brought to you by:
sits
|
From: <si...@us...> - 2008-07-22 00:50:45
|
User: sits
Date: 08/07/21 17:50:44
Modified: . CHANGELOG
lib/Codestriker/Http HighlightLineFilter.pm
Log:
* Better detection of filename extensions for highlighting. This
previously caused issues for temporary directories which contained
a period, but the filename itself didn't. Reported by
rob...@us....
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -r1.245 -r1.246
--- CHANGELOG 11 Jul 2008 23:12:50 -0000 1.245
+++ CHANGELOG 22 Jul 2008 00:50:44 -0000 1.246
@@ -18,7 +18,12 @@
of Subversion. This has now been fixed by
rob...@us....
-* Ability to parse git patches correctly.
+* Ability to parse git patches correctly.
+
+* Better detection of filename extensions for highlighting. This
+ previously caused issues for temporary directories which contained
+ a period, but the filename itself didn't. Reported by
+ rob...@us....
Version 1.9.5
Index: HighlightLineFilter.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/HighlightLineFilter.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HighlightLineFilter.pm 1 Jul 2008 05:59:50 -0000 1.6
+++ HighlightLineFilter.pm 22 Jul 2008 00:50:44 -0000 1.7
@@ -75,7 +75,8 @@
# Determine the filename extension so the highlighter knows what language
# to apply highlighting to. Handle CVS files which might end in ,v.
my $extension = ".txt";
- if ($delta->{filename} =~ /^.*(\..*),v$/o || $delta->{filename} =~ /^.*(\..*)$/o) {
+ if ($delta->{filename} =~ /^.*(\.[^\/\\]*),v$/o ||
+ $delta->{filename} =~ /^.*(\.[^\/\\]*)$/o) {
$extension = $1;
}
|