Added detection of ATX headings without leading blank line.
Handle unescaping input text before passing it back.
More work on escaping, handling end of content elements.