This is what we do when we convert one of our Bettercare textbooks from a traditional InDesign workflow to markdown for this workflow. You'll probably develop your own process for turning existing books into markdown. Maybe this will help.
- Open the InDesign file and copy all the text.
- Paste the text with formatting into your text editor.
- Search and replace (S&R) all line breaks with double line breaks:
- Tick 'Regular expression' (because you're using the regex
\n
to mean 'line break', not actually searching for the characters 'slash' and 'lowercase en').
- Tick 'Regular expression' (because you're using the regex