MarkdownToOpenXML icon indicating copy to clipboard operation
MarkdownToOpenXML copied to clipboard

Functionality - Strip hashes from end of a header string

Open danbroooks opened this issue 12 years ago • 2 comments

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.

Headers in Markdown

danbroooks avatar Aug 06 '13 08:08 danbroooks

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.

mirhagk avatar Aug 26 '13 12:08 mirhagk

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.

danbroooks avatar Aug 26 '13 15:08 danbroooks