84f35c8b44
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.
23 lines
315 B
Plaintext
23 lines
315 B
Plaintext
---
|
|
source: src/labels/process.rs
|
|
expression: board_to_text(board)
|
|
---
|
|
#end
|
|
:touch
|
|
#take gems 100 lt_
|
|
#give gems 100
|
|
You have hundreds of gems.
|
|
#end
|
|
:lt_
|
|
#take gems 10 lt__
|
|
#give gems 10
|
|
You have tens of gems.
|
|
#end
|
|
:lt__
|
|
#take gems 1 lt_a
|
|
#give gems 1
|
|
You have at least one gem.
|
|
#end
|
|
:lt_a
|
|
You don't have any gems!
|