Bugfix: fix rendering of code block

Also add $ to tell input from output.

Similar to issue reported in #500