Skip to content

Add distinctive highlight-based clozing#133

Open
voctory wants to merge 2 commits into
reuseman:mainfrom
voctory:main
Open

Add distinctive highlight-based clozing#133
voctory wants to merge 2 commits into
reuseman:mainfrom
voctory:main

Conversation

@voctory

@voctory voctory commented Oct 10, 2022

Copy link
Copy Markdown

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
Copy Markdown
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

voctory commented Oct 19, 2022

Copy link
Copy Markdown
Author

@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

voctory commented Oct 19, 2022

Copy link
Copy Markdown
Author

Some examples:

image

@putzwasser

putzwasser commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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.

3 participants