← Questions
Parse and repair Markdown emphasis markers
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Handle a small subset of Markdown: * for italic, ** for bold and ~~ for strikethrough, which must nest properly.
- Render a string to tagged output, recognizing the two-character markers before a single
*(and deciding what***means). - Report whether the input is well formed.
- Repair malformed input with a fixed rule: a marker that closes the innermost open format closes it, a marker that would cross an outer open format is dropped, and anything still open at the end is dealt with consistently. Use a stack of open markers throughout.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
