fixed a bug in the markdown directive in order to incorporate the evaluation of state variables