Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@iamllama
Copy link
Contributor

Closes #3889

There currently isn't an easy and accurate way to tell if a rendered card is empty. In rslib, a test checks for the "card is blank" substring, whereas in ankidroid:

An AnkiDroid feature that marks previewer tabs with a warning badge if they are empty is therefore forced to check for the presence of the doc page link in the rendered card text, which is kind of a hacky frontend fix

This pr proposes to modify the card rendering output to return a flag indicating if the card was empty (missing cloze or empty front), replacing the need for flaky substring matching

Breakage:

@dae
Copy link
Member

dae commented Mar 31, 2025

This is better - thank you!

@dae dae merged commit ccab18b into ankitects:main Mar 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add method to check if the front of a card is empty

3 participants