Author: ai0867
Date: Wed Jan 13 05:32:10 2010
New Revision: 40686

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40686&view=rev
Log:
(partial) fix for incorrect wmllint 'unbalanced' handling

Modified:
    trunk/data/tools/wmllint

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=40686&r1=40685&r2=40686&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Wed Jan 13 05:32:10 2010
@@ -1695,14 +1695,14 @@
             # Handle text (non-map) lines.  It can use within().
             newline = textxform(filename, lineno, line)
             newdata.append(newline + terminator)
+            fields = newline.split("#")
+            trimmed = fields[0]
+            destringed = re.sub('"[^"]*"', '', trimmed)        # Ignore string 
literals
+            comment = ""
+            if len(fields) > 1:
+                comment = fields[1]
             # Now do warnings based on the state of the tag stack.
             if not unbalanced:
-                fields = newline.split("#")
-                trimmed = fields[0]
-                destringed = re.sub('"[^"]*"', '', trimmed)    # Ignore string 
literals
-                comment = ""
-                if len(fields) > 1:
-                    comment = fields[1]
                 for instance in re.finditer(r"\[\/?\+?([a-z][a-z_]*[a-z])\]", 
destringed):
                     tag = instance.group(1)
                     attributes = []


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to