mirror of
https://github.com/panatgithub/AnkiHeadingSync.git
synced 2026-07-22 06:51:43 +00:00
中文: 优化问答题多级列表字段映射与解析,移除填空题兼容性误判,并调整填空题正文分隔符和设置页展示。 English: Refine QA group field mapping and parser behavior, remove stale cloze compatibility assumptions, and update cloze body separator plus settings UI copy.
1.9 KiB
1.9 KiB
QA Group Mapping / Parser Decisions
Mapping Authority
- Concrete saved slots remain the runtime sync authority.
- Derivation metadata is settings-time metadata, not a runtime replacement for saved slots.
First-Pair Derivation
- QA Group mappings now optionally persist:
titleFieldderivation.mode = "first-pair"derivation.firstQuestionFieldderivation.firstAnswerField
- When both selected first fields contain a numeric segment:
- use the last numeric segment in each field name
- require both fields to start at the same index
- require the first selected pair to start at
1 - preserve numeric width when generating later fields
- stop at the first missing complete pair
- When one or both selected first fields have no numeric segment:
- keep exactly one configured pair
- do not try to auto-extend further pairs
Refresh Behavior
- If a saved QA Group mapping has derivation metadata, reading fields from Anki regenerates slots from the stored first pair.
- If a saved QA Group mapping does not have derivation metadata, reading fields from Anki only refreshes
loadedFieldNamesand preserves the saved explicit slots.
Parser Behavior
- QA Group answers now use the entire child block under each first-level item.
- The parser dedents the child block before storing it as answer markdown.
- If the child block is exactly one direct child list item, the parser unwraps that outer bullet so existing simple answers stay stable.
- If the child block contains multiple child bullets, paragraphs, nested lists, or fences, the parser keeps the markdown structure.
Cloze Cleanup
- Removed
NoteModelDetails.isClozebecause sync no longer depends on Cloze-compatibility metadata. - Kept
CreateAnkiModelInput.isClozebecause model creation still needs the AnkiConnectcreateModelcontract. - Removed the dead
clozeIncompatiblei18n message because no code path still emits it.