forked from github/kensanata.oddmuse
(name): Show the last 60 characters of a XPath test
instead of the first 60 as this makes them easier to find.
This commit is contained in:
11
t/test.pl
11
t/test.pl
@@ -1,8 +1,8 @@
|
||||
# Copyright (C) 2004, 2005, 2006 Alex Schroeder <alex@emacswiki.org>
|
||||
# Copyright (C) 2004, 2005, 2006, 2008 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package OddMuse;
|
||||
use lib '.';
|
||||
@@ -78,7 +75,7 @@ sub get_page {
|
||||
sub name {
|
||||
$_ = shift;
|
||||
s/\n/\\n/g;
|
||||
$_ = substr($_, 0, 60) . '...' if length > 63;
|
||||
$_ = '...' . substr($_, -60) if length > 63;
|
||||
return $_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user