If I enable anki.md.insertNewCardID and run Anki:SendToOwnDeck three times in a row on this deck:
# Test CardID Bug
## Front (2024-06-08 19:51:42)
%
Back (2024-06-08 19:51:42)
The extension generates a new CardID each time I call Anki:SendToOwnDeck:
# Test CardID Bug
## Front (2024-06-08 19:51:42)
<!-- notecardId: 1717892297556 -->
<!-- notecardId: null -->
<!-- notecardId: 1717892291264 -->
%
Back (2024-06-08 19:51:42)
This appears to happen because Transformer:insertNoteIDs() writes the IDs to the front, but CardParser:parseCardLines() attempts to read them from the back. When the CardID is not found each time, it adds another one.
If I enable anki.md.insertNewCardID and run Anki:SendToOwnDeck three times in a row on this deck:
The extension generates a new CardID each time I call Anki:SendToOwnDeck:
This appears to happen because Transformer:insertNoteIDs() writes the IDs to the front, but CardParser:parseCardLines() attempts to read them from the back. When the CardID is not found each time, it adds another one.