Escaping in shortcode

I would use the {{%%}} style shortcode to let the renderer know it needs further processing and then wrap your code in single or triple backticks per typical markdown syntax.