Author: soliton
Date: Tue May 5 22:23:07 2009
New Revision: 35451
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35451&view=rev
Log:
made the script a bit more robust
Modified:
trunk/utils/tagfind
Modified: trunk/utils/tagfind
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/tagfind?rev=35451&r1=35450&r2=35451&view=diff
==============================================================================
--- trunk/utils/tagfind (original)
+++ trunk/utils/tagfind Tue May 5 22:23:07 2009
@@ -36,10 +36,12 @@
while ( <> ) {
s/\s+//g;
- next if /^#/;
+ next if /^\s*#/;
+ # ignore [tag][/tag]
+ next if /\[\+?(\w+)\]\s*\[\/(\w+)\]/;
chomp;
- unshift @tags,$1 if /\[\+?(\w*)\]/;
- if ( /\[\/(\w*)\]/ ) {
+ unshift @tags,$1 if /^\s*\[\+?(\w+)\]\s*(|#.*)$/;
+ if ( /\[\/(\w+)\]/ ) {
die "bad WML in $ARGV, [/$1] found inside [...@tags[0]], quitting"
if $1 ne @tags[0];
shift @tags;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits