Overhaul label sanitization logic
Besides code cleanup, this commit changes the sanitization logic to avoid numeric digits altogether. Previously, they had been allowed at the end of a label name, but this is susceptible to a ZZT parser bug: `#foo` matches `:foo2` because ZZT allows a prefix match if the next character is a digit.
This commit is contained in:
@@ -9,14 +9,14 @@ expression: board_to_text(board)
|
||||
You have hundreds of gems.
|
||||
#end
|
||||
:lt_
|
||||
#take gems 10 lt_0
|
||||
#take gems 10 lt__
|
||||
#give gems 10
|
||||
You have tens of gems.
|
||||
#end
|
||||
:lt_0
|
||||
#take gems 1 lt1
|
||||
:lt__
|
||||
#take gems 1 lt_a
|
||||
#give gems 1
|
||||
You have at least one gem.
|
||||
#end
|
||||
:lt1
|
||||
:lt_a
|
||||
You don't have any gems!
|
||||
|
||||
Reference in New Issue
Block a user