Thread:Project:Support desk/When do I need to escape pipes with template? (ParserFunctions)

Hello. Could someone explain when it is needed to replace | (pipes) with the | template in a ParserFunctions context?

For example, I noticed that this works properly:   while this doesn't:   nor    or even   

Does the Mediawiki parser processes the deepest things first (in this example, and THEN the whole  function) so that it is NOT needed to escape pipes unless they're at the same “level” as the pipes used to separate #if test string, value if true and value if false? Thanks in advance.