fixed missing /UL
Fixed extra BR with GitHub line breaks on headings
Removed defunct code branches
allow empty ref using alt text as ID
allow empty link in href
also assert that scan location was unchanged
Merge remote-tracking branch 'refs/remotes/Cocoanetics/develop' into jan/demo
Only add newlines after closing a block level element.