You need to parse these tags: <p/>, <br/>, <blockquote/>, and <del/>.
A sequence of two or more consecutive newline characters starts a new paragraph.
Other formatting commands do not cross paragraphs.
A single newline character is a soft line break, <br/>.
A blockquote is one or more consecutive lines where the first two characters on the line are > (a greater than sign followed by a space).
Text in strikethrough (<del></del>) is surrounded by a pair of tildes.
Example:
markdown_input = """This is a paragraph with a soft
line break.
This is another paragraph that has
> Some text that
> is in a
> block quote.
This is another paragraph with a ~~strikethrough~~ word."""
output = """<p>This is a paragraph with a soft<br />line break.</p>
<p>This is another paragraph that has<br />
<blockquote>Some text that<br />is in a<br />block quote.</blockquote>
</p>
<p>This is another paragraph with a <del>strikethrough</del> word.</p>"""
Note: It is not important to produce this specific output. We only care if the HTML is valid.
This problem asks you to convert lightly formatted Markdown into valid HTML while preserving paragraph structure, soft line breaks, blockquotes, and strikethrough text. The key is to process the input line by line, split paragraphs on blank lines, turn single newlines into <code><br /></code>, recognize lines starting with <code>> </code> as blockquotes, and wrap text between tildes with <code><del></code>. A careful state-based parser is usually the cleanest solution.