From: Tara L Andrews Date: Tue, 29 May 2012 03:03:32 +0000 (+0200) Subject: quick hack to make CTE-derived reading IDs valid XML names X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=222d58f10f00b766849be205554662b2bbcd29f9;p=scpubgit%2Fstemmatology.git quick hack to make CTE-derived reading IDs valid XML names --- diff --git a/lib/Text/Tradition/Parser/CTE.pm b/lib/Text/Tradition/Parser/CTE.pm index cf8a2e7..be6adfc 100644 --- a/lib/Text/Tradition/Parser/CTE.pm +++ b/lib/Text/Tradition/Parser/CTE.pm @@ -111,7 +111,9 @@ sub parse { sub _stringify_sigil { my( @nodes ) = @_; my @parts = grep { /\w/ } map { $_->data } @nodes; - return join( '', @parts ); + my $whole = join( '', @parts ); + $whole =~ s/\W//g; + return $whole; } # Get rid of all the formatting elements that get in the way of tokenization.