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

[FEAT] Custom cloze tokens #556

Closed
polyipseity opened this issue Dec 19, 2022 · 3 comments
Closed

[FEAT] Custom cloze tokens #556

polyipseity opened this issue Dec 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@polyipseity
Copy link
Contributor

Currently the plugin provides ==highlights==, **bold text**, and {{curly brackets}} (d8c0e9e) for clozes. It might be better to allow user-inputted characters as the opening and closing tokens like the separator options now.

However, currently you can enable all three cloze options simultaneously, unlike the separator options where you can only specify one separator, so this might need to be handled by either:

  1. Multiple cloze tokens can be specified (perhaps extend this to the separator options)
  2. Add the custom token option while keeping the current three options (maybe deprecate the latter later)

I am willing to put the work into implementing it but I want to see if this is a good idea first.

@st3v3nmw
Copy link
Owner

Hi,

I've just made a release v1.13.0 that ships with custom cloze patterns 🥳 all thanks to #943. The updated documentation is live here.

I've tested the release but not as extensively as I normally would. Perhaps we need a beta version of the plugin? That being said, I'm on standby to fix bugs ASAP. Just give me a shout.

Cheers.

@polyipseity
Copy link
Contributor Author

Hi,

I've just made a release v1.13.0 that ships with custom cloze patterns 🥳 all thanks to #943. The updated documentation is live here.

I've tested the release but not as extensively as I normally would. Perhaps we need a beta version of the plugin? That being said, I'm on standby to fix bugs ASAP. Just give me a shout.

Cheers.

Thanks! One quick issue that I have found: Upgrading settings does not work. It expects the property clozePatterns to exist in data.json in order to upgrade the settings, but clearly said property does not exist in old versions of the plugin. The stacktrace is as follows:

plugin:obsidian-spaced-repetition:11549 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'contains')
    at upgradeSettings (plugin:obsidian-spaced-repetition:11549:72)
    at _SRPlugin.loadPluginData (plugin:obsidian-spaced-repetition:26650:60)
    at async _SRPlugin.onload (plugin:obsidian-spaced-repetition:26358:5)

@polyipseity
Copy link
Contributor Author

Otherwise, the update looks fine to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants