Functionality - Strip hashes from end of a header string
Allow for closing of headers with #'s. If a header is found, then it needs to strip out the #'s from the end of the string aswell as the start. This should be simple enough, instead of using Substring, use Trim.
A problem with the current parser is that it groups multiple lines together, and then it analyzes it line by line. This means it needs to parse twice because there are rules about which lines can wrap (whether it's in a list, below a header etc).
I'd like to take out the StripDoubleLines function and build the line wrapping into the parsing paragraph section as a recursive call to analyze the paragraph after it's been determined what kind of paragraph it is.
Yes okay, that sounds good. StripDoubleLines was a bit of a 'quick and dirty' way of achieving the wrapping effect anyway and it is probably best done the way you say anyway.