Support <code> tags, refactor handling of common tag formats, closes #8