Split Markdown into chunks that keep their headers

0
Remix

Split a Markdown file into chunks no larger than a size limit. When a new chunk starts in the middle of a section, it must begin with the headers that text sits under (for example its level-1 and level-2 headers), followed by the text itself. Decide how the repeated headers count against the size limit and what to do with a single piece of text that is too big on its own.

SierraTechnical phone screenLast asked Apr 2026
No answer yet. Write the first one; the best answer gets endorsed.