Markdown display

State machine

Need to peek at next element and then run state change

Need a "Write stuff until type" method

Section type, has title and content, based on level 2 headers

States

  • Start
    • Read Header -> Start Section Write everything
  • Start Section Write start section stuff, then to Section
  • Section
    • Read Header -> End Section
    • EOF -> End Section
  • End Section
    • Close section, then to Start