Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add distinctive highlight-based clozing #133

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

voctory
Copy link

@voctory voctory commented Oct 10, 2022

Based on #118
I've been using this plugin for months and this has been my biggest gripe up until now — I'm sure this change will help save countless hours of Clozing :)

@bytewife
Copy link
Contributor

Hey @voctory

From my understanding, with these changes, the plugin will create multiple Anki cards if a given line has multiple clozes, right?
Could you clarify further?

@voctory
Copy link
Author

voctory commented Oct 19, 2022

@ivyraine Exactly, on the condition that the multiple clozes are highlight clozes. More specific clozing (e.g. matching up {1:pairs} of {1:keywords}) to a single cloze is still possible through the curly bracket syntax

@voctory
Copy link
Author

voctory commented Oct 19, 2022

Some examples:

image

@putzwasser
Copy link
Contributor

putzwasser commented Oct 20, 2022

As this is a breaking change it shouldn't simply be merged into main.

Otherwise the decks of the users who used this plugin "as-is" would be a complete mess after this merge/update.

There should be at least a configuration setting for the plugin, giving the users the option to choose how multiple == clozes should be treated.

Another idea could be to add a specific tag for this, like #anki-multicloze and #anki/multicloze, which would tell the parser to treat each == cloze as individual cloze.

@bytewife
Copy link
Contributor

@putzwasser is right, this is a breaking change. I'd like to +1 the configuration setting recommendation. @voctory could you add that?

@putzwasser
Copy link
Contributor

The (additional?) #anki-multicloze solution would give users even more flexibility. Instead of deciding, which "format" they'd need/wanted to use they could just use the tag.

The tag could be an indicator to reverse the setting. So, if multiple distinct clozes is turned on #anki-multicloze would enable the user to simply use == instead of the (more tedious) {1:first} and {1:second} cloze. If multiple distinct clozes is turned off, anki-multicloze would make each == cloze into separate distinct clozes (==first== and ==second== cloze #anki-multicloze turning into {{1:first}} and {{2:second}} cloze anki card).

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.

None yet

3 participants