add failing tests for reference links and code

see GitHub issues #5 and #6
fix reference-style links in excerpt

convert file to HTML to determine first paragraph
this fixes issue #5 and explicitly tests for the #6 edge case