Bookdown contest submission: mindr: convert a bookdown project into a mind map, and vice versa

This is a very creative package! Thanks for sharing!

There are a couple of minor details that I think could be improved:

  1. The attributes after section headers can be removed, such as {-} after Yihui Xie in the mind map for the blogdown book (the second image above).
  2. To identify section headers robustly, you may try to convert Markdown to JSON via Pandoc, instead of using regular expressions. In your first image, a literal code chunk is not a section header but a comment.
  3. You'll have to adjust the levels of headers for parts and appendices, e.g., when you find # (APPENDIX), it is probably a better idea to show all the rest of first-level headers as second-level headers (and Appendix is the first-level header).