ArneVogel/listudy

"Embed your own tactic" not working for tactics ending in promotion

Closed this issue · 1 comments

I've been creating my own embedded tactics and they have worked well so far. Except I have since noticed that when a tactic involves promotion, it scores the promotion move as incorrect.

Here is an example: https://listudy.org/en/iframe/custom-tactic#JHsyYjUvUTcvMnA1LzFrNi8xUDYvNVAyLzNwMlBLLzNyNCBiIC0gLSAwIDUxfTske1JoMSsgS3hoMSBkMT1RK307JHtmN2E3fQ==

Here is another: https://listudy.org/en/iframe/custom-tactic#JHtSNy9QNWtwLzRwcHAxLzRiMy84LzNLNC82cjEvOCB3IC0gLSAwIDM4fTske1JnOCsgS3hnOCBhOD1RK307JHthMmcyfQ==

I am not sure if this is a problem only in tactics that end with a promotion, or if it would occur in tactics that involved a promotion but had subsequent moves before completing the tactic.

This is occurring in all tactics that include promotion and I think I figured out why. It's an issue with a regular expression that is removing the equals sign from the move. I submitted a pull request for it.