Closed aleksejrs closed 6 months ago
Another way would be to add your own key to the json object. Like so:
{
"_comment": "Remember to change this limit back to 0 after Friday",
"deckNames": ["lorem ipsum 1"],
...
}
Basically as long as it's valid json, then Anki's built-in mw.addonManager.getConfig()
doesn't care, and as long as it doesn't conflict with the config this add-on uses it's fine.
The only other annoying thing is Anki will format the json which includes sorting the json object keys so that can make placing "comments" tricky.
Possibly upstream would be willing to support json5 which has the ability to do native comments.
Is there anything more you looking for in this case, or is it okay to close as answered?
Thanks.
I've found these ways:
For a configuration for a specific sub-deck, add the comment as a deck name:
For a regexp match, add "
(|my comment)
" to the regexp where it won't match anything or add the comment as an alternative to something already there:Or as a separate configuration, for a separator: