mirror of
https://github.com/panatgithub/AnkiHeadingSync.git
synced 2026-07-22 06:51:43 +00:00
中文: 新增填空题(全部挖空)变种,支持 #anki-cloze-all 并复用现有填空题模板与主字段。 English: Adds an all-cloze variant using #anki-cloze-all while reusing the existing Cloze note type and main field mapping.
2.2 KiB
2.2 KiB
Cloze All Variant Decisions
Final config id
- New card type config id:
cloze-all.
Runtime card type decision
- Runtime
cardTyperemainsclozefor both Cloze variants. cloze-allis a recognition/config id, not a new runtime note-mapping type.
Cloze mode shape and storage
- Add optional
clozeMode?: "sequential" | "all"toIndexedCard. - Indexing assigns:
sequentialfor normalclozeallforcloze-all
- Missing or legacy mode is treated as
sequential. - No separate persisted card-state schema migration is required if the mode remains transient on indexed/render planning data and hash payload only.
Rendering behavior
- Unnumbered clozes in sequential mode use
c1/c2/c3/.... - Unnumbered clozes in all mode use
c1/c1/c1/.... - Explicit numbering is preserved unchanged in both modes.
Settings UI behavior
- Rename current
clozerow label to填空题(逐个挖空). - Add
填空题(全部挖空)row. cloze-allrow shows only:- enabled toggle
- heading level
- extra marker
- explanatory text that it reuses the same Cloze note type and main field
cloze-alldoes not expose separate note type or field mapping controls.
Shared mapping compatibility
cloze-allreuses the same Cloze note type ascloze.cloze-allreuses the existingcloze:<modelName>mapping key.getRuntimeCardType(configId)and settings helpers are the compatibility seam for this reuse.
Configured-count decision
- Count
cloze-allas a separate enabled configured mode in the settings summary. - The count is considered configured when the shared Cloze note type has cached fields available.
- This keeps the summary aligned with visible recognition modes while still reusing one mapping.
Compatibility and migration
- Old settings missing
cloze-allare normalized by adding the default config. - Existing
clozeconfig remains untouched. - Existing Markdown and existing
#anki-clozebehavior remain unchanged.
Intentional deviation from the plan
- No new persisted plugin-state field is planned unless a later code path requires it; current repository structure supports the feature by carrying
clozeModeon indexed/render-path data and by including it in render hashing.