Avoid an empty-string warning
tla [Fri, 16 Aug 2013 09:44:14 +0000 (11:44 +0200)]
base/lib/Text/Tradition/Parser/CTE.pm

index 6093066..a670d52 100644 (file)
@@ -535,9 +535,9 @@ sub _add_lacunae {
                # Find the anchor, if any. This marks the point where the text starts
                # or ends.
                my $anchor = $app->getAttribute( 'to' );
-               $anchor =~ s/^\#//;
                my $aname;
                if( $anchor ) {
+                       $anchor =~ s/^\#//;
                        $aname = _anchor_name( $anchor );
                }