Allow conditional formats to expand formats

Currently, a conditional format only returns the string given based on
whether the condition is true or false.  This means the following does not
work:

   #{?session_attached,#{session_name},no session}

This change expands the item returned from the conditional if it's a
recognised format.