Rewrite markdown directive so that we can use it for modal also.
refs #60