diff --git a/src/apyanki/anki.py b/src/apyanki/anki.py index 23f1241..f15c314 100644 --- a/src/apyanki/anki.py +++ b/src/apyanki/anki.py @@ -598,6 +598,8 @@ def _update_file_with_note_ids( # Extract each note's section and check if it needs to be updated updated_content: list[str] = [] + # Keep content before first '# Note' + updated_content.append(content[0 : note_positions[0]]) for i in range(len(note_positions) - 1): start = note_positions[i] end = note_positions[i + 1]