fix backticks in inline code (fixes #312)

Fixes #312.
Some simple test cases are included in linked issue.