Quote:
Originally Posted by ownedbycats
Question: How do conditionals handle replaced values?
Example:
category=>foo=>bar
Would I use &&category==foo or &&category==bar?
|
Quote:
Originally Posted by chrnno
Replace metadata does lines one-by-one in order and on conditionals simply checks what the value is at that point. Does not keep track if value has been changed previously, nor skip ahead to check if it will be changed.
|
Close, but not quite. Yes, it does line-by-line, but it does it on the value currently requested. What happens with a conditional is that the same look code is recursively called on the conditional entry. (Presumably 'bar' in this case.)
In this case,
category when it's found in
&&category==bar and the final value of
category after all it's transformations is what's used.
But to prevent infinite recursion, nothing that changes
category can use
category for a conditional. It's easy do that accidentally and not realize it.