wmllint double-quotes IDs containing single-quote.

This diff also fixes two comments where the lift code was 
a bit overzealous.  No real harm done, fortunately.
This commit is contained in:
Eric S. Raymond 2008-11-10 12:03:47 +00:00
parent eadcf9f336
commit aa6e7629e0
3 changed files with 7 additions and 5 deletions

View file

@ -418,7 +418,7 @@
value=0
[/set_variable]
# create AI="guardian units. They can't move unless an enemy"
# create AI=guardian units. They can't move unless an enemy
# moves nearby. I create them at the beginning because when the
# player sees them, events will fire.

View file

@ -2,7 +2,7 @@
[unit_type]
id=Skeletal Dragon
name= _ "Skeletal Dragon"
#not 'race="monster', because we need the not_living attribute"
#not 'race=monster', because we need the not_living attribute
race=undead
image="units/monsters/skeletal-dragon.png"
hitpoints=86

View file

@ -856,9 +856,11 @@ def hack_syntax(filename, lines):
try:
(key, prefix, value, comment) = parse_attribute(lines[i])
if "'" in value and value[0].isalpha() and value[-1].isalpha():
lines[i] = prefix + '"' + value + '"' + comment + "\n"
if verbose:
print '"%s", line %d: quote-enclosing attribute value.'%(filename, i+1)
newtext = prefix + '"' + value + '"' + comment + "\n"
if lines[i] != newtext:
lines[i] = newtext
if verbose:
print '"%s", line %d: quote-enclosing attribute value.'%(filename, i+1)
except TypeError:
pass
# More syntax transformations would go here.